88 for (
const auto node: ids)
96 for (
const auto node: ids)
104 for (
const auto node: ids)
140 for (
const auto& arc: set)
148 for (
auto iter =
parents.beginSafe();
162 for (
auto iter =
children.beginSafe();
173 for (
const auto& arc: set)
181 for (
auto iter =
parents.beginSafe();
193 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
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...
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
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
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
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
Signaler2< NodeId, NodeId > onArcDeleted
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)