51#ifndef GUM_LEARNING_GRAPH_CHANGE_H
52#define GUM_LEARNING_GRAPH_CHANGE_H
89 class ArcTriangleDeletion1;
90 class ArcTriangleDeletion2;
All hash functions should inherit from this class.
static Size castToSize(const learning::ArcAddition &key)
Returns the value of a key as a Size.
Size operator()(const learning::ArcAddition &key) const final
computes the hashed value of a key
Size operator()(const learning::ArcDeletion &key) const final
computes the hashed value of a key
static Size castToSize(const learning::ArcDeletion &key)
Returns the value of a key as a Size.
Size operator()(const learning::ArcReversal &key) const final
computes the hashed value of a key
static Size castToSize(const learning::ArcReversal &key)
Returns the value of a key as a Size.
static Size castToSize(const learning::ArcTriangleDeletion1 &key)
Returns the value of a key as a Size.
Size operator()(const learning::ArcTriangleDeletion1 &key) const final
computes the hashed value of a key
static Size castToSize(const learning::ArcTriangleDeletion2 &key)
Returns the value of a key as a Size.
Size operator()(const learning::ArcTriangleDeletion2 &key) const final
computes the hashed value of a key
Size operator()(const learning::EdgeAddition &key) const final
computes the hashed value of a key
static Size castToSize(const learning::EdgeAddition &key)
Returns the value of a key as a Size.
static Size castToSize(const learning::EdgeDeletion &key)
Returns the value of a key as a Size.
Size operator()(const learning::EdgeDeletion &key) const final
computes the hashed value of a key
static Size castToSize(const learning::GraphChange &key)
Returns the value of a key as a Size.
Size operator()(const learning::GraphChange &key) const final
computes the hashed value of a key
This class should be useless as only its specializations should be used.
The class for notifying learning algorithms of new arc additions.
ArcAddition(NodeId node1, NodeId node2) noexcept
default constructor
ArcAddition(const ArcAddition &from) noexcept
copy constructor
~ArcAddition() noexcept
destructor
ArcAddition(ArcAddition &&from) noexcept
move constructor
The class for notifying learning algorithms of arc removals.
ArcDeletion(const ArcDeletion &from) noexcept
copy constructor
ArcDeletion(ArcDeletion &&from) noexcept
move constructor
ArcDeletion(NodeId node1, NodeId node2) noexcept
default constructor
~ArcDeletion() noexcept
destructor
The class for notifying learning algorithms of arc reversals.
ArcReversal(const ArcReversal &from) noexcept
copy constructor
ArcReversal(NodeId node1, NodeId node2) noexcept
default constructor
~ArcReversal() noexcept
destructor
ArcReversal(ArcReversal &&from) noexcept
move constructor
The graph change substituting a triangle node1->node2->node3 + node1->node3 into v-structure node2->n...
ArcTriangleDeletion1(NodeId node1, NodeId node2, NodeId node3) noexcept
default constructor
ArcTriangleDeletion1(const ArcTriangleDeletion1 &from) noexcept
copy constructor
NodeId node3() const
returns the third node involved in the modification (if any)
ArcTriangleDeletion1(ArcTriangleDeletion1 &&from) noexcept
move constructor
~ArcTriangleDeletion1() noexcept
destructor
The graph change substituting a triangle node1->node2->node3 + node1->node3 into v-structure node1->n...
~ArcTriangleDeletion2() noexcept
destructor
NodeId node3() const
returns the third node involved in the modification (if any)
ArcTriangleDeletion2(ArcTriangleDeletion2 &&from) noexcept
move constructor
ArcTriangleDeletion2(NodeId node1, NodeId node2, NodeId node3) noexcept
default constructor
ArcTriangleDeletion2(const ArcTriangleDeletion2 &from) noexcept
copy constructor
The class for notifying learning algorithms of new edge additions.
EdgeAddition(EdgeAddition &&from) noexcept
move constructor
EdgeAddition(NodeId node1, NodeId node2) noexcept
default constructor
EdgeAddition(const EdgeAddition &from) noexcept
copy constructor
~EdgeAddition() noexcept
destructor
The class for notifying learning algorithms of edge removals.
EdgeDeletion(NodeId node1, NodeId node2) noexcept
default constructor
~EdgeDeletion() noexcept
destructor
EdgeDeletion(EdgeDeletion &&from) noexcept
move constructor
EdgeDeletion(const EdgeDeletion &from) noexcept
copy constructor
GraphChange(GraphChangeType type, NodeId node1, NodeId node2, NodeId node3=0) noexcept
default constructor
std::string typeAsString() const
returns a string corresponding to the type of the change
GraphChangeType type_
the type of modification
NodeId node1() const noexcept
returns the first node involved in the modification
GraphChangeType type() const noexcept
returns the type of the operation
LearnNodeId nodes_[3]
the nodes involved in the edge or arc to be modified
NodeId node2() const noexcept
returns the second node involved in the modification
NodeId node3() const
returns the third node involved in the modification (if any)
std::string toString() const
put the content of the graph change into a string
A class to account for changes in a graph.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size NodeId
Type for node ids.
include the inlined functions if necessary
GraphChangeType
the type of modification that can be applied to the graph
uint32_t LearnNodeId
the internal type of the nodes involved in the arc/edge modifications
gum is the global namespace for all aGrUM entities
Base node set class for graphs.