![]() |
aGrUM 3.3.2
a C++ library for (probabilistic) graphical models
|
The graph change substituting a triangle node1->node2->node3 + node1->node3 into v-structure node1->node2<-node3. More...
#include <graphChange.h>
Public Member Functions | |
Constructors / Destructors | |
| ArcTriangleDeletion2 (NodeId node1, NodeId node2, NodeId node3) noexcept | |
| default constructor | |
| ArcTriangleDeletion2 (const ArcTriangleDeletion2 &from) noexcept | |
| copy constructor | |
| ArcTriangleDeletion2 (ArcTriangleDeletion2 &&from) noexcept | |
| move constructor | |
| ~ArcTriangleDeletion2 () noexcept | |
| destructor | |
Operators | |
| ArcTriangleDeletion2 & | operator= (const ArcTriangleDeletion2 &from) noexcept |
| copy constructor | |
| ArcTriangleDeletion2 & | operator= (ArcTriangleDeletion2 &&from) noexcept |
| move operator | |
| bool | operator== (const ArcTriangleDeletion2 &from) const noexcept |
| returns whether two ArcTriangleDeletion2 are identical or not | |
| bool | operator!= (const ArcTriangleDeletion2 &from) const noexcept |
| returns whether two ArcTriangleDeletion2 are different or not | |
Accessors/Modifiers | |
| NodeId | node3 () const |
| returns the third node involved in the modification (if any) | |
Operators | |
| bool | operator== (const GraphChange &from) const noexcept |
| returns whether two graph changes are identical or not | |
| bool | operator!= (const GraphChange &from) const noexcept |
| returns whether two graph changes are different or not | |
Accessors/Modifiers | |
| GraphChangeType | type () const noexcept |
| returns the type of the operation | |
| 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 | |
| NodeId | node2 () const noexcept |
| returns the second node involved in the modification | |
| std::string | toString () const |
| put the content of the graph change into a string | |
Protected Attributes | |
| LearnNodeId | nodes_ [3] |
| the nodes involved in the edge or arc to be modified | |
| GraphChangeType | type_ |
| the type of modification | |
The graph change substituting a triangle node1->node2->node3 + node1->node3 into v-structure node1->node2<-node3.
This class is convenient to know at compile time which graph change we are dealing with. Thus, this enables to perform faster code (we can avoid using a switch on GraphChanges to determine which change corresponds to this class.
Definition at line 444 of file graphChange.h.
|
noexcept |
default constructor
The triangle that we wish to delete (substitute by a v-structure) is the following: node1 -> node2 -> node3 + node1 -> node3. It is substituted by v-structure node1 -> node2 <- node3
Definition at line 200 of file graphChange.cpp.
References gum::learning::ARC_TRIANGLE_DELETION2, gum::learning::GraphChange::node1(), gum::learning::GraphChange::node2(), and node3().
Referenced by ArcTriangleDeletion2(), ArcTriangleDeletion2(), operator!=(), operator=(), operator=(), and operator==().
|
noexcept |
copy constructor
Definition at line 204 of file graphChange.cpp.
References ArcTriangleDeletion2().
|
noexcept |
move constructor
Definition at line 208 of file graphChange.cpp.
References ArcTriangleDeletion2().
|
noexcept |
|
noexceptinherited |
returns the first node involved in the modification
References node1().
Referenced by gum::learning::ArcAddition::ArcAddition(), gum::learning::ArcDeletion::ArcDeletion(), gum::learning::ArcReversal::ArcReversal(), gum::learning::ArcTriangleDeletion1::ArcTriangleDeletion1(), gum::learning::ArcTriangleDeletion2::ArcTriangleDeletion2(), gum::learning::EdgeAddition::EdgeAddition(), gum::learning::EdgeDeletion::EdgeDeletion(), GraphChange(), gum::learning::StructuralConstraintDAG::checkModificationAlone(), gum::learning::StructuralConstraintDiGraph::checkModificationAlone(), gum::learning::StructuralConstraintForbiddenArcs::checkModificationAlone(), gum::learning::StructuralConstraintIndegree::checkModificationAlone(), gum::learning::StructuralConstraintMandatoryArcs::checkModificationAlone(), gum::learning::StructuralConstraintNoChildrenNodes::checkModificationAlone(), gum::learning::StructuralConstraintNoParentNodes::checkModificationAlone(), gum::learning::StructuralConstraintPossibleEdges::checkModificationAlone(), gum::learning::StructuralConstraintSliceOrder::checkModificationAlone(), gum::learning::StructuralConstraintTabuList::checkModificationAlone(), gum::learning::StructuralConstraintTotalOrder::checkModificationAlone(), gum::learning::StructuralConstraintForbiddenArcs::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintMandatoryArcs::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintNoChildrenNodes::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintPossibleEdges::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintSliceOrder::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintTotalOrder::isAlwaysInvalidAlone(), node1(), and toString().
|
noexceptinherited |
returns the second node involved in the modification
References node2().
Referenced by gum::learning::ArcAddition::ArcAddition(), gum::learning::ArcDeletion::ArcDeletion(), gum::learning::ArcReversal::ArcReversal(), gum::learning::ArcTriangleDeletion1::ArcTriangleDeletion1(), gum::learning::ArcTriangleDeletion2::ArcTriangleDeletion2(), gum::learning::EdgeAddition::EdgeAddition(), gum::learning::EdgeDeletion::EdgeDeletion(), GraphChange(), gum::learning::StructuralConstraintDAG::checkModificationAlone(), gum::learning::StructuralConstraintDiGraph::checkModificationAlone(), gum::learning::StructuralConstraintForbiddenArcs::checkModificationAlone(), gum::learning::StructuralConstraintIndegree::checkModificationAlone(), gum::learning::StructuralConstraintMandatoryArcs::checkModificationAlone(), gum::learning::StructuralConstraintNoChildrenNodes::checkModificationAlone(), gum::learning::StructuralConstraintNoParentNodes::checkModificationAlone(), gum::learning::StructuralConstraintPossibleEdges::checkModificationAlone(), gum::learning::StructuralConstraintSliceOrder::checkModificationAlone(), gum::learning::StructuralConstraintTabuList::checkModificationAlone(), gum::learning::StructuralConstraintTotalOrder::checkModificationAlone(), gum::learning::StructuralConstraintForbiddenArcs::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintMandatoryArcs::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintNoChildrenNodes::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintPossibleEdges::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintSliceOrder::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintTotalOrder::isAlwaysInvalidAlone(), node2(), and toString().
| NodeId gum::learning::ArcTriangleDeletion2::node3 | ( | ) | const |
returns the third node involved in the modification (if any)
| InvalidNode | is raised if the modification does not involve a third |
Referenced by ArcTriangleDeletion2().
|
noexcept |
returns whether two ArcTriangleDeletion2 are different or not
Two ArcTriangleDeletion2 differ if and only if either they do not involve the same set of nodes or those are not in the same order.
References ArcTriangleDeletion2().
|
noexceptinherited |
returns whether two graph changes are different or not
References GraphChange().
|
noexcept |
move operator
Definition at line 219 of file graphChange.cpp.
References ArcTriangleDeletion2(), and gum::learning::GraphChange::operator=().
|
defaultnoexcept |
copy constructor
copy operator
References ArcTriangleDeletion2(), and operator=().
Referenced by operator=().
|
noexcept |
returns whether two ArcTriangleDeletion2 are identical or not
Two ArcTriangleDeletion2 are identical if and only if they involve the same set of nodes, in the same order.
References ArcTriangleDeletion2().
|
noexceptinherited |
returns whether two graph changes are identical or not
References GraphChange().
|
inherited |
put the content of the graph change into a string
put the content of the GraphChange into a string
Definition at line 273 of file graphChange.cpp.
References gum::learning::ARC_ADDITION, gum::learning::ARC_DELETION, gum::learning::ARC_REVERSAL, gum::learning::ARC_TRIANGLE_DELETION1, gum::learning::ARC_TRIANGLE_DELETION2, gum::learning::EDGE_ADDITION, gum::learning::EDGE_DELETION, GUM_ERROR, node1(), node2(), node3(), and type().
Referenced by node3(), and gum::learning::operator<<().
|
noexceptinherited |
returns the type of the operation
References typeAsString().
Referenced by GraphChange(), gum::learning::StructuralConstraintDAG::checkModificationAlone(), gum::learning::StructuralConstraintDiGraph::checkModificationAlone(), gum::learning::StructuralConstraintForbiddenArcs::checkModificationAlone(), gum::learning::StructuralConstraintIndegree::checkModificationAlone(), gum::learning::StructuralConstraintMandatoryArcs::checkModificationAlone(), gum::learning::StructuralConstraintNoChildrenNodes::checkModificationAlone(), gum::learning::StructuralConstraintNoParentNodes::checkModificationAlone(), gum::learning::StructuralConstraintPossibleEdges::checkModificationAlone(), gum::learning::StructuralConstraintSliceOrder::checkModificationAlone(), gum::learning::StructuralConstraintTabuList::checkModificationAlone(), gum::learning::StructuralConstraintTotalOrder::checkModificationAlone(), gum::learning::StructuralConstraintForbiddenArcs::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintMandatoryArcs::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintNoChildrenNodes::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintPossibleEdges::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintSliceOrder::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintTotalOrder::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintDAG::modifyGraphAlone(), gum::learning::StructuralConstraintDiGraph::modifyGraphAlone(), gum::learning::StructuralConstraintTabuList::modifyGraphAlone(), toString(), and typeAsString().
|
inherited |
returns a string corresponding to the type of the change
Definition at line 302 of file graphChange.cpp.
References gum::learning::ARC_ADDITION, gum::learning::ARC_DELETION, gum::learning::ARC_REVERSAL, gum::learning::ARC_TRIANGLE_DELETION1, gum::learning::ARC_TRIANGLE_DELETION2, gum::learning::EDGE_ADDITION, gum::learning::EDGE_DELETION, GUM_ERROR, and type().
Referenced by gum::learning::StructuralConstraintDAG::checkModificationAlone(), gum::learning::StructuralConstraintDiGraph::checkModificationAlone(), gum::learning::StructuralConstraintForbiddenArcs::checkModificationAlone(), gum::learning::StructuralConstraintIndegree::checkModificationAlone(), gum::learning::StructuralConstraintMandatoryArcs::checkModificationAlone(), gum::learning::StructuralConstraintPossibleEdges::checkModificationAlone(), gum::learning::StructuralConstraintTabuList::checkModificationAlone(), gum::learning::StructuralConstraintForbiddenArcs::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintMandatoryArcs::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintPossibleEdges::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintSliceOrder::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintTotalOrder::isAlwaysInvalidAlone(), gum::learning::StructuralConstraintDAG::modifyGraphAlone(), gum::learning::StructuralConstraintDiGraph::modifyGraphAlone(), gum::learning::StructuralConstraintTabuList::modifyGraphAlone(), and type().
|
protectedinherited |
the nodes involved in the edge or arc to be modified
Definition at line 175 of file graphChange.h.
Referenced by GraphChange(), GraphChange(), operator=(), and operator=().
|
protectedinherited |
the type of modification
Definition at line 182 of file graphChange.h.
Referenced by GraphChange(), and HashFunc< ArcAddition >.