68 for (
NodeId i = 0; i < nb_nodes; ++i) {
78 for (
const auto id:
graph) {
131 switch (change.
type()) {
149 "Graph change operation "
151 <<
" is not supported by the Indegree structural constraint");
Base class for all oriented graphs.
Exception : operation not allowed.
std::string typeAsString() const
returns a string corresponding to the type of the change
NodeId node1() const noexcept
returns the first node involved in the modification
GraphChangeType type() const noexcept
returns the type of the operation
NodeId node2() const noexcept
returns the second node involved in the modification
NodeId node3() const
returns the third node involved in the modification (if any)
The base class for structural constraints used by learning algorithms that learn a directed graph str...
StructuralConstraintDiGraph & operator=(const StructuralConstraintDiGraph &from)
copy operator
the class for structural constraints limiting the number of parents of nodes in a directed graph
Size _Indegree_max_indegree_
a default max indegree to assign for nodes without specified indegree
bool checkArcTriangleDeletion1Alone(NodeId node1, NodeId node2, NodeId node3) const
checks whether the constraints enable to apply an ArcTriangleDeletion1
bool checkModificationAlone(const ArcAddition &change) const
checks whether the constraints enable to add an arc
StructuralConstraintIndegree & operator=(const StructuralConstraintIndegree &from)
copy operator
bool checkArcDeletionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to remove arc (x,y)
StructuralConstraintIndegree()
default constructor
bool checkArcReversalAlone(NodeId x, NodeId y) const
checks whether the constraints enable to reverse arc (x,y)
NodeProperty< Size > _Indegree_max_parents_
the max number of parents per node
bool checkArcAdditionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to add arc (x,y)
~StructuralConstraintIndegree() override
destructor
bool checkArcTriangleDeletion2Alone(NodeId node1, NodeId node2, NodeId node3) const
checks whether the constraints enable to apply an ArcTriangleDeletion2
#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
gum is the global namespace for all aGrUM entities
the class for structural constraints limiting the number of parents of nodes in a directed graph
the class for structural constraints limiting the number of parents of nodes in a directed graph