![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
the structural constraint for forbidding children for some nodes More...
#include <structuralConstraintNoChildrenNodes.h>
Public Types | |
| using | allConstraints = _ConstraintSet_< void > |
Public Member Functions | |
Constructors / Destructors | |
| StructuralConstraintNoChildrenNodes () | |
| default constructor | |
| StructuralConstraintNoChildrenNodes (const DiGraph &graph) | |
| constructor starting with a given graph | |
| StructuralConstraintNoChildrenNodes (const StructuralConstraintNoChildrenNodes &from) | |
| copy constructor | |
| StructuralConstraintNoChildrenNodes (StructuralConstraintNoChildrenNodes &&from) | |
| move constructor | |
| virtual | ~StructuralConstraintNoChildrenNodes () |
| destructor | |
Operators | |
| StructuralConstraintNoChildrenNodes & | operator= (const StructuralConstraintNoChildrenNodes &from) |
| copy operator | |
| StructuralConstraintNoChildrenNodes & | operator= (StructuralConstraintNoChildrenNodes &&from) |
| move operator | |
Specific Accessors / Modifiers | |
| void | setNodes (const NodeSet &set) |
| assign a set of nodes without children | |
| void | addNode (NodeId node) |
| assign a new node without children | |
| void | eraseNode (NodeId node) |
| remove a forbidden w node without children | |
| const NodeSet & | nodes () const |
| returns the set of w nodes without children | |
| void | setGraphAlone (const DiGraph &graph) |
| sets a new graph from which we will perform checkings | |
| void | modifyGraphAlone (const ArcAddition &change) |
| notify the constraint of a modification of the graph | |
| void | modifyGraphAlone (const ArcDeletion &change) |
| notify the constraint of a modification of the graph | |
| void | modifyGraphAlone (const ArcReversal &change) |
| notify the constraint of a modification of the graph | |
| void | modifyGraphAlone (const GraphChange &change) |
| notify the constraint of a modification of the graph | |
| bool | isAlwaysInvalidAlone (const GraphChange &change) const |
| indicates whether a change will always violate the constraint | |
| bool | checkArcAdditionAlone (NodeId x, NodeId y) const |
| checks whether the constraints enable to add arc (x,y) | |
| bool | checkArcDeletionAlone (NodeId x, NodeId y) const |
| checks whether the constraints enable to remove arc (x,y) | |
| 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 | |
| bool | checkModificationAlone (const ArcAddition &change) const |
| checks whether the constraints enable to add an arc | |
| bool | checkModificationAlone (const ArcDeletion &change) const |
| checks whether the constraints enable to remove an arc | |
| bool | checkModificationAlone (const ArcReversal &change) const |
| checks whether the constraints enable to reverse an arc | |
Protected Attributes | |
| NodeSet | _noChildrenNodes_ |
| the set of w nodes without children on which we perform checks | |
the structural constraint for forbidding children for some nodes
Definition at line 61 of file structuralConstraintNoChildrenNodes.h.
|
inherited |
Definition at line 61 of file structuralConstraint.h.
| gum::learning::StructuralConstraintNoChildrenNodes::StructuralConstraintNoChildrenNodes | ( | ) |
default constructor
Definition at line 59 of file structuralConstraintNoChildrenNodes.cpp.
References StructuralConstraintNoChildrenNodes().
Referenced by StructuralConstraintNoChildrenNodes(), StructuralConstraintNoChildrenNodes(), StructuralConstraintNoChildrenNodes(), StructuralConstraintNoChildrenNodes(), ~StructuralConstraintNoChildrenNodes(), operator=(), and operator=().
| gum::learning::StructuralConstraintNoChildrenNodes::StructuralConstraintNoChildrenNodes | ( | const DiGraph & | graph | ) |
constructor starting with a given graph
Definition at line 64 of file structuralConstraintNoChildrenNodes.cpp.
References StructuralConstraintNoChildrenNodes().
| gum::learning::StructuralConstraintNoChildrenNodes::StructuralConstraintNoChildrenNodes | ( | const StructuralConstraintNoChildrenNodes & | from | ) |
copy constructor
Definition at line 70 of file structuralConstraintNoChildrenNodes.cpp.
References StructuralConstraintNoChildrenNodes(), and _noChildrenNodes_.
| gum::learning::StructuralConstraintNoChildrenNodes::StructuralConstraintNoChildrenNodes | ( | StructuralConstraintNoChildrenNodes && | from | ) |
move constructor
Definition at line 76 of file structuralConstraintNoChildrenNodes.cpp.
References StructuralConstraintNoChildrenNodes(), and _noChildrenNodes_.
|
virtual |
destructor
Definition at line 83 of file structuralConstraintNoChildrenNodes.cpp.
References StructuralConstraintNoChildrenNodes().
| void gum::learning::StructuralConstraintNoChildrenNodes::addNode | ( | NodeId | node | ) |
assign a new node without children
| bool gum::learning::StructuralConstraintNoChildrenNodes::checkArcAdditionAlone | ( | NodeId | x, |
| NodeId | y ) const |
checks whether the constraints enable to add arc (x,y)
| bool gum::learning::StructuralConstraintNoChildrenNodes::checkArcDeletionAlone | ( | NodeId | x, |
| NodeId | y ) const |
checks whether the constraints enable to remove arc (x,y)
| bool gum::learning::StructuralConstraintNoChildrenNodes::checkArcReversalAlone | ( | NodeId | x, |
| NodeId | y ) const |
checks whether the constraints enable to reverse arc (x,y)
| bool gum::learning::StructuralConstraintNoChildrenNodes::checkModificationAlone | ( | const ArcAddition & | change | ) | const |
checks whether the constraints enable to add an arc
| bool gum::learning::StructuralConstraintNoChildrenNodes::checkModificationAlone | ( | const ArcDeletion & | change | ) | const |
checks whether the constraints enable to remove an arc
| bool gum::learning::StructuralConstraintNoChildrenNodes::checkModificationAlone | ( | const ArcReversal & | change | ) | const |
checks whether the constraints enable to reverse an arc
| bool gum::learning::StructuralConstraintNoChildrenNodes::checkModificationAlone | ( | const GraphChange & | change | ) | const |
checks whether the constraints enable to perform a graph change
| void gum::learning::StructuralConstraintNoChildrenNodes::eraseNode | ( | NodeId | node | ) |
remove a forbidden w node without children
| bool gum::learning::StructuralConstraintNoChildrenNodes::isAlwaysInvalidAlone | ( | const GraphChange & | change | ) | const |
indicates whether a change will always violate the constraint
Some learning algorithms need examine several times whether a given graph change can be applied. For instance, the first time arc (X,Y) addition is considered, the learning algorithm may discard this change because it violates the structural constraint (e.g., if the latter enforces a DAG structure, this arc addition might induce a directed cycle), but, later on, other arc removal may induce that the arc addition is now possible. Such change is thus not always invalid. Conversely, there are changes that can be discarded once and for all. For instance, in a 2TBN structure, it is always impossible to add a backward-time arc. Such graph changes are always invalid and are therefore tagged as such by the isAlwaysInvalid method.
| void gum::learning::StructuralConstraintNoChildrenNodes::modifyGraphAlone | ( | const ArcAddition & | change | ) |
notify the constraint of a modification of the graph
| void gum::learning::StructuralConstraintNoChildrenNodes::modifyGraphAlone | ( | const ArcDeletion & | change | ) |
notify the constraint of a modification of the graph
| void gum::learning::StructuralConstraintNoChildrenNodes::modifyGraphAlone | ( | const ArcReversal & | change | ) |
notify the constraint of a modification of the graph
| void gum::learning::StructuralConstraintNoChildrenNodes::modifyGraphAlone | ( | const GraphChange & | change | ) |
notify the constraint of a modification of the graph
| const NodeSet & gum::learning::StructuralConstraintNoChildrenNodes::nodes | ( | ) | const |
returns the set of w nodes without children
| StructuralConstraintNoChildrenNodes & gum::learning::StructuralConstraintNoChildrenNodes::operator= | ( | const StructuralConstraintNoChildrenNodes & | from | ) |
copy operator
Definition at line 88 of file structuralConstraintNoChildrenNodes.cpp.
References StructuralConstraintNoChildrenNodes(), and _noChildrenNodes_.
| StructuralConstraintNoChildrenNodes & gum::learning::StructuralConstraintNoChildrenNodes::operator= | ( | StructuralConstraintNoChildrenNodes && | from | ) |
move operator
Definition at line 96 of file structuralConstraintNoChildrenNodes.cpp.
References StructuralConstraintNoChildrenNodes(), and _noChildrenNodes_.
| void gum::learning::StructuralConstraintNoChildrenNodes::setGraphAlone | ( | const DiGraph & | graph | ) |
sets a new graph from which we will perform checkings
| void gum::learning::StructuralConstraintNoChildrenNodes::setNodes | ( | const NodeSet & | set | ) |
assign a set of nodes without children
|
protected |
the set of w nodes without children on which we perform checks
Definition at line 180 of file structuralConstraintNoChildrenNodes.h.
Referenced by StructuralConstraintNoChildrenNodes(), StructuralConstraintNoChildrenNodes(), operator=(), and operator=().