28 #ifndef GUM_LEARNING_STRUCTURAL_CONSTRAINT_INDEGREE_H 29 #define GUM_LEARNING_STRUCTURAL_CONSTRAINT_INDEGREE_H 33 #include <agrum/agrum.h> 34 #include <agrum/BN/learning/constraints/structuralConstraintDiGraph.h> 35 #include <agrum/BN/learning/constraints/structuralConstraintSetStatic.h> 95 void setIndegree(
const NodeProperty< Size >& max_indegree);
99 void setMaxIndegree(Size max_indegree,
bool update_all_node =
false);
196 #ifndef DOXYGEN_SHOULD_SKIP_THIS 200 # define GUM_CONSTRAINT_CLASS_NAME StructuralConstraintIndegree 201 # include <agrum/BN/learning/constraints/structuralConstraintPatternHeader.h> 202 # undef GUM_CONSTRAINT_CLASS_NAME 218 #ifndef GUM_NO_INLINE 219 # include <agrum/BN/learning/constraints/structuralConstraintIndegree_inl.h> void setIndegree(const NodeProperty< Size > &max_indegree)
sets the default max indegree for all the nodes in the property
the class for structural constraints limiting the number of parents of nodes in a directed graph ...
virtual ~StructuralConstraintIndegree()
destructor
INLINE void emplace(Args &&... args)
void setMaxIndegree(Size max_indegree, bool update_all_node=false)
resets the default max indegree and possibly updates the indegree of all nodes
StructuralConstraintIndegree & operator=(StructuralConstraintIndegree &&from)
move operator
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
StructuralConstraintIndegree(Size nb_nodes, Size max_indegree)
constructor starting with an empty graph with a given number of nodes
bool checkArcDeletionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to remove arc (x,y)
bool checkArcAdditionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to add arc (x,y)
StructuralConstraintIndegree()
default constructor
StructuralConstraintIndegree(const DiGraph &graph, Size max_indegree)
constructor starting with a given graph
StructuralConstraintIndegree(const StructuralConstraintIndegree &from)
copy constructor
Size _Indegree_max_indegree_
a default max indegree to assign for nodes without specified indegree
StructuralConstraintIndegree(StructuralConstraintIndegree &&from)
move constructor
NodeProperty< Size > _Indegree_max_parents_
the max number of parents per node
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
void setGraphAlone(const DiGraph &graph)
sets a new graph from which we will perform checkings
StructuralConstraintIndegree & operator=(const StructuralConstraintIndegree &from)
copy operator
void modifyGraphAlone(const GraphChange &change)
notify the constraint of a modification of the graph
bool checkArcReversalAlone(NodeId x, NodeId y) const
checks whether the constraints enable to reverse arc (x,y)