42#ifndef GUM_ARC_GRAPH_PART_H
43#define GUM_ARC_GRAPH_PART_H
114 bool arcs_resize_policy =
true);
267 template <
typename VAL >
277 template <
typename VAL >
283 template <
typename VAL >
Inline implementation of classes for directed edge sets.
Implementation of the gumArcGraphPart.
Classes for directed edge sets.
ArcProperty< VAL > arcsProperty(VAL(*f)(const Arc &), Size size=0) const
a method to create a hashMap of VAL from a set of arcs (using for every arc, say x,...
bool emptyArcs() const
indicates wether the ArcGraphPart contains any arc
virtual void addArc(NodeId tail, NodeId head)
insert a new arc into the ArcGraphPart
bool existsArc(const Arc &arc) const
indicates whether a given arc exists
NodeSet family(NodeId id) const
returns the set of nodes which consists in the node and its parents
bool operator==(const ArcGraphPart &p) const
tests whether two ArcGraphParts contain the same arcs
Size sizeArcs() const
indicates the number of arcs stored within the ArcGraphPart
void _checkParents_(NodeId id)
when the ArcGraphPart contains no arc ingoing into a given node, this function adds an empty set entr...
virtual ~ArcGraphPart()
destructor
ArcSetIterator ArcIterator
const NodeSet & parents(NodeId id) const
returns the set of nodes with arc ingoing to a given node
Signaler2< NodeId, NodeId > onArcAdded
Set< Arc > _arcs_
the set of all the arcs contained within the ArcGraphPart
ArcGraphPart & operator=(const ArcGraphPart &s)
copy operator
void _checkChildren_(NodeId id)
when the ArcGraphPart contains no arc outgoing from a given node, this function adds an empty set ent...
void eraseSetOfArcs_(const ArcSet &set)
a (virtualized) function to remove a given set of arcs
std::vector< NodeId > directedUnorientedPath(NodeId node1, NodeId node2) const
returns an unoriented (directed) path from node1 to node2 in the arc set
ArcProperty< VAL > arcsProperty(const VAL &a, Size size=0) const
a method to create a hashMap of VAL from a set of arcs (using for every arc, say x,...
void clearArcs()
removes all the arcs from the ArcGraphPart
void unvirtualizedEraseChildren(NodeId id)
same function as eraseChildren but without any virtual call to an erase
NodeProperty< NodeSet * > _children_
for each arc, the set of its children
List< VAL > listMapArcs(VAL(*f)(const Arc &)) const
a method to create a list of VAL from a set of arcs (using for every arc, say x, the VAL f(x))
void unvirtualizedEraseParents(NodeId id)
same function as eraseParents but without any virtual call to an erase
NodeSet descendants(NodeId id) const
returns the set of nodes with directed path outgoing from a given node
void eraseParents(NodeId id)
erase all the parents of a given node
void eraseChildren(NodeId id)
removes all the children of a given node
void unvirtualizedEraseSetOfArcs_(const ArcSet &set)
similar to eraseSetOfArcs_ except that it is unvirtualized
NodeProperty< NodeSet * > _parents_
for each arc, the sets of its parents
NodeSet children(const NodeSet &ids) const
returns the set of children of a set of nodes
NodeSet ancestors(NodeId id) const
returns the set of nodes with directed path ingoing to a given node
virtual void eraseArc(const Arc &arc)
removes an arc from the ArcGraphPart
ArcGraphPart(Size arcs_size=HashTableConst::default_size, bool arcs_resize_policy=true)
default constructor
std::vector< NodeId > directedPath(NodeId node1, NodeId node2) const
returns a directed path from node1 to node2 belonging to the set of arcs
const ArcSet & arcs() const
returns the set of arcs stored within the ArcGraphPart
Signaler2< NodeId, NodeId > onArcDeleted
std::string toString() const
to friendly display the content of the ArcGraphPart
The base class for all directed edges.
Generic doubly linked lists.
some utils for topology : NodeId, Edge, Arc and consorts ...
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.
ArcSet::const_iterator ArcSetIterator
Some typdefs and define for shortcuts ...
Set< Arc > ArcSet
Some typdefs and define for shortcuts ...
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
static constexpr Size default_size
The default number of slots in hashtables.