![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
The class for notifying learning algorithms of new edge additions. More...
#include <graphChange.h>
Public Member Functions | |
Constructors / Destructors | |
| EdgeAddition (NodeId node1, NodeId node2) noexcept | |
| default constructor | |
| EdgeAddition (const EdgeAddition &from) noexcept | |
| copy constructor | |
| EdgeAddition (EdgeAddition &&from) noexcept | |
| move constructor | |
| ~EdgeAddition () noexcept | |
| destructor | |
Operators | |
| EdgeAddition & | operator= (const EdgeAddition &from) noexcept |
| copy constructor | |
| EdgeAddition & | operator= (EdgeAddition &&from) noexcept |
| move operator | |
| bool | operator== (const EdgeAddition &from) const noexcept |
| returns whether two edge additions are identical or not | |
| bool | operator!= (const EdgeAddition &from) const noexcept |
| returns whether two edge additions are different or not | |
Accessors / Modifiers | |
| virtual std::string | toString () const final |
| put the content of the EdgeAddition into a string | |
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 | |
| NodeId | node1 () const noexcept |
| returns the first node involved in the modification | |
| NodeId | node2 () const noexcept |
| returns the second node involved in the modification | |
Private Attributes | |
| GraphChangeType | _type_ |
| the type of modification | |
| NodeId | _node1_ |
| the first node in the edge or arc to be modified | |
| NodeId | _node2_ |
| the second node in the edge or arc to be modified | |
The class for notifying learning algorithms of new edge additions.
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 361 of file graphChange.h.
default constructor
References gum::learning::GraphChange::node1(), and gum::learning::GraphChange::node2().
Referenced by EdgeAddition(), EdgeAddition(), operator!=(), operator=(), operator=(), and operator==().
|
noexcept |
|
noexcept |
|
noexcept |
destructor
|
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::EdgeAddition::EdgeAddition(), gum::learning::EdgeDeletion::EdgeDeletion(), GraphChange(), gum::learning::GreedyHillClimbing::learnStructure(), gum::learning::LocalSearchWithTabuList::learnStructure(), node1(), gum::learning::ArcAddition::toString(), gum::learning::ArcDeletion::toString(), gum::learning::ArcReversal::toString(), gum::learning::EdgeAddition::toString(), gum::learning::EdgeDeletion::toString(), and toString().
|
noexceptinherited |
returns the second node involved in the modification
References node2(), and toString().
Referenced by gum::learning::ArcAddition::ArcAddition(), gum::learning::ArcDeletion::ArcDeletion(), gum::learning::ArcReversal::ArcReversal(), gum::learning::EdgeAddition::EdgeAddition(), gum::learning::EdgeDeletion::EdgeDeletion(), GraphChange(), gum::learning::GreedyHillClimbing::learnStructure(), gum::learning::LocalSearchWithTabuList::learnStructure(), node2(), gum::learning::ArcAddition::toString(), gum::learning::ArcDeletion::toString(), gum::learning::ArcReversal::toString(), gum::learning::EdgeAddition::toString(), gum::learning::EdgeDeletion::toString(), and toString().
|
noexcept |
returns whether two edge additions are different or not
References EdgeAddition(), and toString().
|
noexceptinherited |
returns whether two graph changes are different or not
References GraphChange().
|
noexcept |
|
noexcept |
|
noexcept |
returns whether two edge additions are identical or not
References EdgeAddition().
|
noexceptinherited |
returns whether two graph changes are identical or not
References GraphChange().
|
finalvirtual |
put the content of the EdgeAddition into a string
Reimplemented from gum::learning::GraphChange.
Definition at line 111 of file graphChange.cpp.
References gum::learning::GraphChange::node1(), and gum::learning::GraphChange::node2().
Referenced by operator!=(), and gum::learning::operator<<().
|
noexceptinherited |
returns the type of the operation
References type().
Referenced by GraphChange(), gum::learning::GreedyHillClimbing::learnStructure(), gum::learning::LocalSearchWithTabuList::learnStructure(), toString(), and type().
|
privateinherited |
the first node in the edge or arc to be modified
Definition at line 142 of file graphChange.h.
|
privateinherited |
the second node in the edge or arc to be modified
Definition at line 145 of file graphChange.h.
|
privateinherited |
the type of modification
Definition at line 139 of file graphChange.h.