51#ifndef GUM_LEARNING_GRAPH_CHANGE_H
52#define GUM_LEARNING_GRAPH_CHANGE_H
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.
bool operator!=(const ArcAddition &from) const noexcept
returns whether two arc additions are different or not
ArcAddition & operator=(const ArcAddition &from) noexcept
copy constructor
ArcAddition(NodeId node1, NodeId node2) noexcept
default constructor
bool operator==(const ArcAddition &from) const noexcept
returns whether two arc additions are identical or not
The class for notifying learning algorithms of arc removals.
bool operator!=(const ArcDeletion &from) const noexcept
returns whether two arc deletions are different or not
bool operator==(const ArcDeletion &from) const noexcept
returns whether two arc deletions are identical or not
ArcDeletion(NodeId node1, NodeId node2) noexcept
default constructor
ArcDeletion & operator=(const ArcDeletion &from) noexcept
copy constructor
The class for notifying learning algorithms of arc reversals.
ArcReversal & operator=(const ArcReversal &from) noexcept
copy constructor
bool operator!=(const ArcReversal &from) const noexcept
returns whether two arc reversals are different or not
ArcReversal(NodeId node1, NodeId node2) noexcept
default constructor
bool operator==(const ArcReversal &from) const noexcept
returns whether two arc reversals are identical or not
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 & operator=(const ArcTriangleDeletion1 &from) noexcept
copy constructor
NodeId node3() const
returns the third node involved in the modification (if any)
bool operator!=(const ArcTriangleDeletion1 &from) const noexcept
returns whether two ArcTriangleDeletion1 are different or not
bool operator==(const ArcTriangleDeletion1 &from) const noexcept
returns whether two ArcTriangleDeletion1 are identical or not
The graph change substituting a triangle node1->node2->node3 + node1->node3 into v-structure node1->n...
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
ArcTriangleDeletion2 & operator=(const ArcTriangleDeletion2 &from) noexcept
copy constructor
NodeId node3() const
returns the third node involved in the modification (if any)
ArcTriangleDeletion2(NodeId node1, NodeId node2, NodeId node3) noexcept
default constructor
The class for notifying learning algorithms of new edge additions.
bool operator!=(const EdgeAddition &from) const noexcept
returns whether two edge additions are different or not
bool operator==(const EdgeAddition &from) const noexcept
returns whether two edge additions are identical or not
EdgeAddition & operator=(const EdgeAddition &from) noexcept
copy constructor
EdgeAddition(NodeId node1, NodeId node2) noexcept
default constructor
The class for notifying learning algorithms of edge removals.
EdgeDeletion & operator=(const EdgeDeletion &from) noexcept
copy constructor
EdgeDeletion(NodeId node1, NodeId node2) noexcept
default constructor
bool operator!=(const EdgeDeletion &from) const noexcept
returns whether two edge deletions are different or not
bool operator==(const EdgeDeletion &from) const noexcept
returns whether two edge deletions are identical or not
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
bool operator==(const GraphChange &from) const noexcept
returns whether two graph changes are identical or not
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
GraphChange & operator=(const GraphChange &from) noexcept
copy constructor
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
bool operator!=(const GraphChange &from) const noexcept
returns whether two graph changes are different or not
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
std::ostream & operator<<(std::ostream &stream, const IdCondSet &idset)
the display operator
class GUM_PUBLIC_BN EdgeDeletion
class GUM_PUBLIC_BN ArcTriangleDeletion1
class GUM_PUBLIC_BN ArcReversal
GraphChangeType
the type of modification that can be applied to the graph
class GUM_PUBLIC_BN ArcDeletion
class GUM_PUBLIC_BN ArcTriangleDeletion2
uint32_t LearnNodeId
the internal type of the nodes involved in the arc/edge modifications
class GUM_PUBLIC_BN ArcAddition
class GUM_PUBLIC_BN EdgeAddition
gum is the global namespace for all aGrUM entities
Base node set class for graphs.