51#ifndef DOXYGEN_SHOULD_SKIP_THIS
88 switch (change.type()) {
97 "arc modifications are not "
98 "supported by StructuralConstraintUndiGraph");
114 switch (change.type()) {
125 "arc modifications are not supported "
126 "by StructuralConstraintUndiGraph");
138 for (
NodeId i = 0; i < nb_nodes; ++i) {
144# define GUM_CONSTRAINT_CLASS_NAME StructuralConstraintUndiGraph
146# undef GUM_CONSTRAINT_CLASS_NAME
virtual void eraseEdge(const Edge &edge)
removes an edge from the EdgeGraphPart
bool existsEdge(const Edge &edge) const
indicates whether a given edge exists
Edge(NodeId aN1, NodeId aN2)
constructs a new edge (aN1,aN2)
bool existsNode(const NodeId id) const
returns true iff the NodeGraphPart contains the given nodeId
virtual void addNodeWithId(const NodeId id)
try to insert a node with the given id
void clear() override
removes all the nodes and edges from the graph
void addEdge(NodeId first, NodeId second) override
insert a new edge into the undirected graph
The class for notifying learning algorithms of new edge additions.
The class for notifying learning algorithms of edge removals.
bool checkEdgeDeletionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to remove edge (x,y)
UndiGraph _UndiGraph_graph_
the UndiGraph on which we perform checks
void setGraphAlone(const UndiGraph &graph)
sets a new graph from which we will perform checkings
void modifyGraphAlone(const EdgeAddition &change)
notify the constraint of a modification of the graph
bool checkEdgeAdditionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to add edge (x,y)
void setGraph(Size nb_nodes)
sets a new empty graph from which we will perform checkings
bool isAlwaysInvalidAlone(const GraphChange &change) const
indicates whether a change will always violate the constraint
bool checkModificationAlone(const GraphChange &change) const
checks whether the constraints enable to perform a graph change
#define GUM_ERROR(type, msg)
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
include the inlined functions if necessary
class GUM_PUBLIC_BN EdgeDeletion
class GUM_PUBLIC_BN EdgeAddition
gum is the global namespace for all aGrUM entities
the base class for structural constraints used by learning algorithms that learn an undirected graph ...