143 bool nodes_resize_policy =
true,
145 bool arcs_resize_policy =
true);
204 virtual void clear();
207 virtual std::string
toString()
const;
212 virtual std::string
toDot()
const;
ArcGraphPart(Size arcs_size=HashTableConst::default_size, bool arcs_resize_policy=true)
default constructor
Base class for all oriented graphs.
virtual void eraseNode(const NodeId id)
remove a node and its adjacent arcs from the graph
bool hasDirectedPath(NodeId from, NodeId to)
checks whether there exists a directed path from from to to
virtual void clear()
removes all the nodes and arcs from the graph
static DiGraph completeGraph(int n)
Build a complete DiGraph with n nodes.
virtual std::string toDot() const
to friendly display the content of the graph in the DOT syntax
DiGraph & operator=(const DiGraph &g)
copy operator
DiGraph(Size nodes_size=HashTableConst::default_size, bool nodes_resize_policy=true, Size arcs_size=HashTableConst::default_size, bool arcs_resize_policy=true)
default constructor
bool operator==(const DiGraph &g) const
tests whether two DiGraphs are identical (same nodes, same arcs)
virtual void addArc(const NodeId tail, const NodeId head)
insert a new arc into the directed graph
Sequence< NodeId > topologicalOrder() const
Build and return a topological order.
virtual ~DiGraph()
destructor
virtual std::string toString() const
to friendly display the content of the graph
NodeGraphPart(Size holes_size=HashTableConst::default_size, bool holes_resize_policy=true)
default constructor
Inline implementation of Base classes for oriented graphs.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
gum is the global namespace for all aGrUM entities
std::ostream & operator<<(std::ostream &stream, const AVLTree< Val, Cmp > &tree)
display the content of a tree
Base node set class for graphs.
Header file of gum::Sequence, a class for storing (ordered) sequences of objects.
static constexpr Size default_size
The default number of slots in hashtables.