84 for (
const auto node: ids)
92 for (
const auto node: ids)
128 for (
const auto& arc: set)
136 for (
auto iter =
parents.beginSafe();
150 for (
auto iter =
children.beginSafe();
161 for (
const auto& arc: set)
169 for (
auto iter =
parents.beginSafe();
181 for (
auto iter =
children.beginSafe();
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...
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
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
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
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
The base class for all directed edges.
GUM_NODISCARD NodeId head() const
returns the head of the arc
GUM_NODISCARD NodeId tail() const
returns the tail of the arc
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
Set< Arc > ArcSet
Some typdefs and define for shortcuts ...
const NodeSet emptyNodeSet
Some typdefs and define for shortcuts ...
Set< NodeId > NodeSet
Some typdefs and define for shortcuts ...
gum is the global namespace for all aGrUM entities
#define GUM_EMIT2(signal, arg1, arg2)