23 #ifndef GUM_ARC_GRAPH_PART_H 24 #define GUM_ARC_GRAPH_PART_H 95 bool arcs_resize_policy =
true);
218 template <
typename VAL >
228 template <
typename VAL >
234 template <
typename VAL >
243 const NodeId node2)
const;
251 const NodeId node2)
const;
295 #ifndef GUM_NO_INLINE 297 #endif // GUM_NOINLINE 301 #endif // GUM_ARC_GRAPH_PART_H const std::vector< NodeId > directedUnorientedPath(const NodeId node1, const NodeId node2) const
returns an unoriented (directed) path from node1 to node2 in the arc set
void __checkParents(const NodeId id) const
when the ArcGraphPart contains no arc ingoing into a given node, this function adds an empty set entr...
const std::string toString() const
to friendly display the content of the ArcGraphPart
virtual void addArc(const NodeId tail, const NodeId head)
insert a new arc into the ArcGraphPart
ArcGraphPart & operator=(const ArcGraphPart &s)
copy operator
void clearArcs()
removes all the arcs from the ArcGraphPart
Classes for directed edge sets.
virtual void eraseArc(const Arc &arc)
removes an arc from the ArcGraphPart
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, the VAL f(x))
static constexpr Size default_size
The default number of slots in hashtables.
Generic doubly linked lists.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
The class for generic Hash Tables.
void __checkChildren(const NodeId id) const
when the ArcGraphPart contains no arc outgoing from a given node, this function adds an empty set ent...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void _eraseSetOfArcs(const ArcSet &set)
a (virtualized) function to remove a given set of arcs
std::ostream & operator<<(std::ostream &output, const BayesNet< GUM_SCALAR > &bn)
Prints map's DAG in output using the Graphviz-dot format.
bool emptyArcs() const
indicates wether the ArcGraphPart contains any arc
bool operator!=(const ArcGraphPart &p) const
tests whether two ArcGraphParts contain different arcs
Size sizeArcs() const
indicates the number of arcs stored within the ArcGraphPart
The base class for all directed edgesThis class is used as a basis for manipulating all directed edge...
const NodeSet & parents(const NodeId id) const
returns the set of nodes with arc ingoing to a given node
bool operator==(const ArcGraphPart &p) const
tests whether two ArcGraphParts contain the same arcs
void _unvirtualizedEraseSetOfArcs(const ArcSet &set)
similar to _eraseSetOfArcs except that it is unvirtualized
const std::vector< NodeId > directedPath(const NodeId node1, const NodeId node2) const
returns a directed path from node1 to node2 belonging to the set of arcs
void eraseChildren(const NodeId id)
removes all the children of a given node
NodeProperty< NodeSet *> __parents
for each arc, the sets of its parents
ArcSetIterator ArcIterator
Unsafe iterators for the Set class.
const NodeSet & children(const NodeId id) const
returns the set of nodes with arc outgoing from a given node
Signaler2< NodeId, NodeId > onArcAdded
virtual ~ArcGraphPart()
destructor
const ArcSet & arcs() const
returns the set of arcs stored within the ArcGraphPart
NodeProperty< NodeSet *> __children
for each arc, the set of its children
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void unvirtualizedEraseChildren(const NodeId id)
same function as eraseChildren but without any virtual call to an erase
void unvirtualizedEraseParents(const NodeId id)
same function as eraseParents but without any virtual call to an erase
Signaler2< NodeId, NodeId > onArcDeleted
std::size_t Size
In aGrUM, hashed values are unsigned long int.
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)) ...
Set< Arc > __arcs
the set of all the arcs contained within the ArcGraphPart
bool existsArc(const Arc &arc) const
indicates whether a given arc exists
ArcGraphPart(Size arcs_size=HashTableConst::default_size, bool arcs_resize_policy=true)
default constructor
Size NodeId
Type for node ids.
void eraseParents(const NodeId id)
erase all the parents of a given node
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.