47#ifndef GUM_UNDIGRAPH_H
48#define GUM_UNDIGRAPH_H
141 bool nodes_resize_policy =
true,
143 bool edges_resize_policy =
true);
204 void clear()
override;
207 std::string
toString()
const override;
210 virtual std::string
toDot()
const;
EdgeGraphPart(Size edges_size=HashTableConst::default_size, bool edges_resize_policy=true)
default constructor
const NodeGraphPart & nodes() const
return *this as a NodeGraphPart
NodeGraphPart(Size holes_size=HashTableConst::default_size, bool holes_resize_policy=true)
default constructor
Base class for undirected graphs.
bool operator==(const UndiGraph &g) const
tests whether two UndiGraphs are identical (same nodes, same edges)
UndiGraph & operator=(const UndiGraph &g)
copy operator
void clear() override
removes all the nodes and edges from the graph
virtual std::string toDot() const
to friendly display graph in DOT format
bool hasUndirectedCycle() const
checks whether the graph contains cycles
static UndiGraph completeGraph(int n)
create a complete UndiGraph with n nodes
void addEdge(NodeId first, NodeId second) override
insert a new edge into the undirected graph
virtual ~UndiGraph()
destructor
NodeProperty< NodeId > nodes2ConnectedComponent() const
returns a property {node:id of connected component}
bool operator!=(const UndiGraph &g) const
tests whether two UndiGraphs are different
std::string toString() const override
to friendly display the content of the graph
virtual UndiGraph partialUndiGraph(NodeSet nodes)
returns the partial graph formed by the nodes given in parameter
void eraseNode(NodeId id) override
remove a node and its adjacent edges from the 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
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 ...
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.
static constexpr Size default_size
The default number of slots in hashtables.
Inline implementation of Base classes for undirected graphs.