27 #ifndef GUM_LEARNING_STRUCTURAL_CONSTRAINT_DAG_H 28 #define GUM_LEARNING_STRUCTURAL_CONSTRAINT_DAG_H 30 #include <agrum/agrum.h> 31 #include <agrum/tools/graphs/algorithms/DAGCycleDetector.h> 32 #include <agrum/BN/learning/constraints/structuralConstraintDiGraph.h> 33 #include <agrum/BN/learning/constraints/structuralConstraintSetStatic.h> 196 #ifndef DOXYGEN_SHOULD_SKIP_THIS 200 # define GUM_CONSTRAINT_CLASS_NAME StructuralConstraintDAG 201 # include <agrum/BN/learning/constraints/structuralConstraintPatternHeader.h> 202 # undef GUM_CONSTRAINT_CLASS_NAME 215 #ifndef GUM_NO_INLINE 216 # include <agrum/BN/learning/constraints/structuralConstraintDAG_inl.h> void setGraph(const DAG &graph)
sets a new graph from which we will perform checkings
StructuralConstraintDAG(const StructuralConstraintDAG &from)
copy constructor
StructuralConstraintDAG(const DAG &graph)
constructor starting with a given graph
StructuralConstraintDAG(StructuralConstraintDAG &&from)
move constructor
StructuralConstraintDAG & operator=(StructuralConstraintDAG &&from)
move operator
INLINE void emplace(Args &&... args)
void setGraphAlone(const DiGraph &graph)
sets a new graph from which we will perform checkings
void setGraphAlone(Size nb_nodes)
sets a new empty graph from which we will perform checkings
bool checkArcAdditionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to add arc (x,y)
StructuralConstraintDAG(Size nb_nodes)
constructor starting with an empty graph with a given number of nodes
bool isAlwaysInvalidAlone(const GraphChange &change) const
indicates whether a change will always violate the constraint
bool checkArcReversalAlone(NodeId x, NodeId y) const
checks whether the constraints enable to reverse arc (x,y)
bool checkModificationAlone(const GraphChange &change) const
checks whether the constraints enable to perform a graph change
StructuralConstraintDAG()
default constructor
bool checkArcDeletionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to remove arc (x,y)
DAGCycleDetector _DAG_cycle_detector_
the cycle detector used to check quickly graph modifications
void modifyGraphAlone(const GraphChange &change)
notify the constraint of a modification of the graph
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
StructuralConstraintDAG & operator=(const StructuralConstraintDAG &from)
copy operator
void setGraph(Size nb_nodes)
sets a new empty graph from which we will perform checkings
virtual ~StructuralConstraintDAG()
destructor
The base class for structural constraints imposed by DAGs.