Package it.unimi.di.prog2.h25.digraph
Class ArcListDiGraph<T>
java.lang.Object
it.unimi.di.prog2.h25.digraph.ArcListDiGraph<T>
- Type Parameters:
T
- the type of the graph nodes.
- All Implemented Interfaces:
DiGraph<T>
A directed graph implementation based on a list of
Arc
s and one of nodes.-
Field Details
-
nodes
The set of graph nodes.Observe that isolated nodes (node not appearing in any arc) belong to this set.
-
arcs
The set of graph arcs.
-
-
Constructor Details
-
ArcListDiGraph
public ArcListDiGraph()
-
-
Method Details
-
addArc
Description copied from interface:DiGraph
Adds an arc to this graph.It the source, or destination, node are not present in the graph, they are also added.
-
addNode
Description copied from interface:DiGraph
Adds a node to this graph. -
nodes
Description copied from interface:DiGraph
Returns the graph nodes. -
arcs
Description copied from interface:DiGraph
Returns this graph arcs.
-