25 #ifndef GUM_UNDIGRAPH_H 26 #define GUM_UNDIGRAPH_H 121 bool nodes_resize_policy =
true,
123 bool edges_resize_policy =
true);
177 virtual void clear();
180 virtual const std::string
toString()
const;
183 virtual const std::string
toDot()
const;
199 #ifndef GUM_NO_INLINE 201 #endif // GUM_NOINLINE Inline implementation of Base classes for undirected graphs.
Base node set class for graphs.
virtual void clear()
removes all the nodes and edges from the graph
virtual void addEdge(const NodeId first, const NodeId second)
insert a new edge into the undirected graph
static constexpr Size default_size
The default number of slots in hashtables.
Classes for undirected edge sets.
gum is the global namespace for all aGrUM entities
virtual void eraseNode(const NodeId id)
remove a node and its adjacent edges from the graph
virtual ~UndiGraph()
destructor
bool operator!=(const UndiGraph &g) const
tests whether two UndiGraphs are different
std::ostream & operator<<(std::ostream &output, const BayesNet< GUM_SCALAR > &bn)
Prints map's DAG in output using the Graphviz-dot format.
bool operator==(const UndiGraph &g) const
tests whether two UndiGraphs are identical (same nodes, same edges)
Class for node sets in graph.
UndiGraph(Size nodes_size=HashTableConst::default_size, bool nodes_resize_policy=true, Size edges_size=HashTableConst::default_size, bool edges_resize_policy=true)
default constructor
Base class for undirected graphs.
bool hasUndirectedCycle() const
checks whether the graph contains cycles
UndiGraph & operator=(const UndiGraph &g)
copy operator
virtual const std::string toString() const
to friendly display the content of the graph
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
virtual const std::string toDot() const
to friendly display graph in DOT format
virtual UndiGraph partialUndiGraph(NodeSet nodesSet)
returns the partial graph formed by the nodes given in parameter