42#ifndef GUM_ARC_GRAPH_PART_H
43#define GUM_ARC_GRAPH_PART_H
114 bool arcs_resize_policy =
true);
246 template <
typename VAL >
256 template <
typename VAL >
262 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
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
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
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
void eraseParents(NodeId id)
erase all the parents of a given node
void eraseChildren(NodeId id)
removes all the children of a given node
Signaler< NodeId, NodeId > onArcDeleted
void unvirtualizedEraseSetOfArcs_(const ArcSet &set)
similar to eraseSetOfArcs_ except that it is unvirtualized
Signaler< NodeId, NodeId > onArcAdded
NodeProperty< NodeSet * > _parents_
for each arc, the sets of its parents
NodeSet children(const NodeSet &ids) const
returns the set of nodes which consists in the node and its parents returns the set of children of a ...
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
const ArcSet & arcs() const
returns the set of arcs stored within the ArcGraphPart
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
Convenience header for the signal/listener pattern.
static constexpr Size default_size
The default number of slots in hashtables.