61 class NeighborIterator;
174 std::string
toDot(
size_t name)
const;
const NodeSet & parents(NodeId id) const
returns the set of nodes with arc ingoing to a given node
NodeSet children(const NodeSet &ids) const
returns the set of children of a set of nodes
The base class for all directed edges.
Set of pairs of elements with fast search for both elements.
virtual std::string toDot() const
to friendly display the content of the graph in the DOT syntax
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
virtual void addArc(const NodeId tail, const NodeId head)
insert a new arc into the directed graph
virtual NodeId addNode()
insert a new node and return its id
NodeGraphPart(Size holes_size=HashTableConst::default_size, bool holes_resize_policy=true)
default constructor
Reprensent a Depth First Search coding of a graph.
bool _expandCodeIsMinimal_(NodeId u, NodeId v)
Returns true if the expand code by adding and edge betwenne u and v is minimal with respect to code.
void rightmostPath(std::list< NodeId > &r_path) const
Fill r_path with the rightmost path of this Pattern. The list is supposed empty.
const ArcSet & arcs() const
NodeProperty< LabelData * > _node_map_
Mapping between nodes in this Pattern and their respective LabelData.
bool isMinimal()
Returns the DFSCode of this Pattern.
LabelData * _last_
The last LabelData added to this pattern.
NodeId addNodeWithLabel(LabelData &l)
Insert a node with the given LabelData.
Size size() const
Returns the number of nodes in this Pattern.
virtual std::string toDot() const
to friendly display the content of the graph in the DOT syntax
void pop_back()
Remove the last EdgeCode of this pattern.
DFSCode & code()
Returns the DFSCode of this Pattern.
ArcProperty< std::pair< LabelData *, EdgeCode * > > _arc_map_
Mapping between edges in this Pattern and their respective LabelData.
Size sizeArcs() const
Returns the number of arcs in this Pattern.
DFSCode _code_
The DFSCode of this Pattern.
Pattern()
Default constructor.
void remove(NodeId node)
Remove a node if it has no neighbors, raise an OperationNotAllowed otherwise.
void addArc(NodeId i, NodeId j, LabelData &l)
Add an arc to this Pattern.
bool exists(NodeId id) const
Returns true if id is a node in this Pattern.
const NodeGraphPart & nodes() const
LabelData & lastAdded()
Insert a node with the given LabelData.
bool _rec_(Pattern &p, Bijection< NodeId, NodeId > &node_map, NodeId u, NodeId v)
Recurisve method used by expandCodeIsMinimal.
LabelData & label(NodeId node)
Returns the LabelData assigned to node.
bool _not_rec_(Pattern &p, Bijection< NodeId, NodeId > &node_map, NodeId u, NodeId v)
A non recursive bugged version of rec.
EdgeCode & edgeCode(NodeId tail, NodeId head)
Returns the EdgeCode of an edge of this Pattern.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
HashTable< Arc, VAL > ArcProperty
Property on graph elements.
Set< Arc > ArcSet
Some typdefs and define for shortcuts ...
HashTable< NodeId, VAL > NodeProperty
Property on graph elements.
Headers of InterfaceGraph.
namespace for all probabilistic relational models entities
gum is the global namespace for all aGrUM entities
Inline implementation of the Pattern class.
represent a DFS code used by gspan.
Inner class to handle data about labels in this interface graph.