123 bool nodes_resize_policy =
true,
125 bool arcs_resize_policy =
true);
177 virtual void clear();
180 virtual const std::string
toString()
const;
185 virtual const std::string
toDot()
const;
210 #ifndef GUM_NO_INLINE 212 #endif // GUM_NOINLINE DiGraph & operator=(const DiGraph &g)
copy operator
Base node set class for graphs.
virtual void addArc(const NodeId tail, const NodeId head)
insert a new arc into the directed graph
bool operator!=(const DiGraph &g) const
tests whether two DiGraphs are different
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
Header file of gum::Sequence, a class for storing (ordered) sequences of objects. ...
Classes for directed edge sets.
virtual void clear()
removes all the nodes and arcs from the graph
virtual const std::string toString() const
to friendly display the content of the graph
static constexpr Size default_size
The default number of slots in hashtables.
virtual ~DiGraph()
destructor
bool operator==(const DiGraph &g) const
tests whether two DiGraphs are identical (same nodes, same arcs)
gum is the global namespace for all aGrUM entities
Sequence< NodeId > * __mutableTopologicalOrder
The topology sequence of this Directed Graphical Model.
std::ostream & operator<<(std::ostream &output, const BayesNet< GUM_SCALAR > &bn)
Prints map's DAG in output using the Graphviz-dot format.
Base class for all oriented graphs.
virtual const std::string toDot() const
to friendly display the content of the graph in the DOT syntax
Class for node sets in graph.
const Sequence< NodeId > & topologicalOrder(bool clear=true) const
The topological order stays the same as long as no variable or arcs are added or erased src the topol...
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Inline implementation of Base classes for oriented graphs.
virtual void eraseNode(const NodeId id)
remove a node and its adjacent arcs from the graph
Size NodeId
Type for node ids.
void __topologicalOrder() const
Returns a topological order of this DAGModel.