128 void clear()
override;
190 std::string
toString()
const override;
191 std::string
toDot()
const override;
The base class for all undirected edges.
Base class for mixed graphs.
Partial Ancestral Graph: undirected topology with endpoint marks.
bool isCircle(NodeId src, NodeId dst) const
true if mark at dst (from src) is Circle
bool isBidirected(NodeId x, NodeId y) const
true if edge x-y is bidirected x↔y (Arrowhead on both endpoints)
bool isDefCollider(NodeId x, NodeId z, NodeId y) const
true if z is a definite collider on path x-z-y (Arrowhead at z from both sides)
PAG & operator=(const PAG &)
void clear() override
remove all nodes, edges, and marks
void reorientAllWith(EdgeMark m)
set all endpoint marks to m (used between FCI phases to reset to Circle)
ArcProperty< EdgeMark > marks_
marks_[Arc(x,y)] = mark at y-endpoint of edge x-y
void addEdge(NodeId x, NodeId y) override
add edge with Circle-Circle marks
void setMarkAt(NodeId src, NodeId dst, EdgeMark m)
set mark at dst-endpoint when traversing from src
bool isTail(NodeId src, NodeId dst) const
true if mark at dst (from src) is Tail
void eraseEdge(const Edge &e) override
remove edge and its two mark entries
EdgeMark markAt(NodeId src, NodeId dst) const
mark at dst-endpoint when traversing from src
std::string toDot() const override
approximate conversion for learnDAG/learnPDAG: Tail-Arrowhead → arc; Arrowhead-Arrowhead → two arcs; ...
void clearEdges() override
clear all edges (and their marks)
bool isArrowhead(NodeId src, NodeId dst) const
true if mark at dst (from src) is Arrowhead
MixedGraph toMixedGraph() const
approximate conversion for learnDAG/learnPDAG: Tail-Arrowhead → arc; Arrowhead-Arrowhead → two arcs; ...
bool isDefinitelyDirected(NodeId x, NodeId y) const
true if edge x-y is definitely directed x→y (Tail@x, Arrowhead@y)
void eraseNode(NodeId id) override
remove node and clean up marks for all its adjacent edges
std::string toString() const override
approximate conversion for learnDAG/learnPDAG: Tail-Arrowhead → arc; Arrowhead-Arrowhead → two arcs; ...
UndiGraph(Size nodes_size=HashTableConst::default_size, bool nodes_resize_policy=true, Size edges_size=HashTableConst::default_size, bool edges_resize_policy=true)
default constructor
Size NodeId
Type for node ids.
HashTable< Arc, VAL > ArcProperty
Property on graph elements.
Base classes for mixed directed/undirected graphs.
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
EdgeMark
Endpoint marks used in PAG edges.