28 #ifndef GUM_LEARNING_STRUCTURAL_CONSTRAINT_MANDATORY_ARCS_H 29 #define GUM_LEARNING_STRUCTURAL_CONSTRAINT_MANDATORY_ARCS_H 31 #include <agrum/agrum.h> 32 #include <agrum/tools/graphs/diGraph.h> 33 #include <agrum/BN/learning/constraints/structuralConstraint.h> 34 #include <agrum/BN/learning/structureUtils/graphChange.h> 88 void setArcs(
const ArcSet& set);
91 void addArc(
const Arc& arc);
182 #ifndef DOXYGEN_SHOULD_SKIP_THIS 186 # define GUM_CONSTRAINT_CLASS_NAME StructuralConstraintMandatoryArcs 187 # include <agrum/BN/learning/constraints/structuralConstraintPatternHeader.h> 188 # undef GUM_CONSTRAINT_CLASS_NAME 201 #ifndef GUM_NO_INLINE 202 # include <agrum/BN/learning/constraints/structuralConstraintMandatoryArcs_inl.h> bool checkArcReversalAlone(NodeId x, NodeId y) const
checks whether the constraints enable to reverse arc (x,y)
const ArcSet & arcs() const
returns the set of mandatory arcs
bool isAlwaysInvalidAlone(const GraphChange &change) const
indicates whether a change will always violate the constraint
StructuralConstraintMandatoryArcs()
default constructor
INLINE void emplace(Args &&... args)
void setArcs(const ArcSet &set)
assign a set of forbidden arcs
the structural constraint indicating that some arcs shall never be removed or reversed ...
void addArc(const Arc &arc)
assign a new forbidden arc
void modifyGraphAlone(const GraphChange &change)
notify the constraint of a modification of the graph
bool checkArcDeletionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to remove arc (x,y)
bool checkModificationAlone(const ArcReversal &change) const
checks whether the constraints enable to reverse an arc
StructuralConstraintMandatoryArcs(StructuralConstraintMandatoryArcs &&from)
move constructor
virtual ~StructuralConstraintMandatoryArcs()
destructor
void eraseArc(const Arc &arc)
remove a forbidden arc
StructuralConstraintMandatoryArcs & operator=(StructuralConstraintMandatoryArcs &&from)
move operator
void setGraphAlone(const DiGraph &graph)
sets a new graph from which we will perform checkings
bool checkArcAdditionAlone(NodeId x, NodeId y) const
checks whether the constraints enable to add arc (x,y)
ArcSet _MandatoryArcs_mandatory_arcs_
the MandatoryArcs on which we perform checks
StructuralConstraintMandatoryArcs(const DiGraph &graph)
constructor starting with a given graph
Database(const std::string &filename, const BayesNet< GUM_SCALAR > &bn, const std::vector< std::string > &missing_symbols)
StructuralConstraintMandatoryArcs(const StructuralConstraintMandatoryArcs &from)
copy constructor
StructuralConstraintMandatoryArcs & operator=(const StructuralConstraintMandatoryArcs &from)
copy operator