47#ifndef GUM_MIXED_GRAPH_H
48#define GUM_MIXED_GRAPH_H
161 bool nodes_resize_policy =
true,
163 bool arcs_resize_policy =
true,
165 bool edges_resize_policy =
true);
215 void clear()
override;
244 std::string
toDot()
const override;
247 std::string
toString()
const override;
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
Base class for mixed graphs.
NodeProperty< NodeId > chainComponents() const
returns a property {node:id of chain component} (edges only)
std::string toString() const override
to friendly display the content of the MixedGraph
bool hasMixedOrientedPath(NodeId node1, NodeId node2) const
returns true if a mixed edge/directed arc path from node1 to node2 in the arc/edge set exists.
void eraseNode(const NodeId node) override
remove a node as well as its adjacent arcs and edges from the graph
std::string toDot() const override
to friendly display mixed graph in DOT format
MixedGraph & operator=(const MixedGraph &g)
copy operator
NodeSet chainComponent(NodeId node) const
returns the set of nodes reachable by undirected path
NodeSet boundary(NodeId node) const
returns the set of node adjacent to a given node
std::optional< std::vector< NodeId > > mixedOrientedPath(NodeId node1, NodeId node2) const
returns a mixed edge/directed arc path from node1 to node2 in the arc/edge set
void clear() override
removes all the nodes, arcs and edges from the graph
MixedGraph(Size nodes_size=HashTableConst::default_size, bool nodes_resize_policy=true, Size arcs_size=HashTableConst::default_size, bool arcs_resize_policy=true, Size edges_size=HashTableConst::default_size, bool edges_resize_policy=true)
default constructor
bool operator==(const MixedGraph &g) const
tests whether two MixedGraphs are identical (same nodes, arcs and edges)
~MixedGraph() override
destructor
NodeProperty< NodeId > connectedComponents() const
returns a property {node:id of weakly connected component}
std::optional< std::vector< NodeId > > mixedUnorientedPath(NodeId node1, NodeId node2) const
returns a mixed/directed path from node1 to node2 in the arc/edge set
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
Concept for mixed graphs (both arcs and edges).
Base classes for oriented graphs.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
Inline implementation of Base classes for mixed graphs.
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
static constexpr Size default_size
The default number of slots in hashtables.
Base classes for undirected graphs.