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.
virtual Size operator()(const learning::ArcAddition &key) const override final
computes the hashed value of a key
static Size castToSize(const learning::ArcDeletion &key)
Returns the value of a key as a Size.
virtual Size operator()(const learning::ArcDeletion &key) const override final
computes the hashed value of a key
virtual Size operator()(const learning::ArcReversal &key) const override 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::EdgeAddition &key)
Returns the value of a key as a Size.
virtual Size operator()(const learning::EdgeAddition &key) const override final
computes the hashed value of a key
static Size castToSize(const learning::EdgeDeletion &key)
Returns the value of a key as a Size.
virtual Size operator()(const learning::EdgeDeletion &key) const override final
computes the hashed value of a key
static Size castToSize(const learning::GraphChange &key)
Returns the value of a key as a Size.
virtual Size operator()(const learning::GraphChange &key) const override 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.
virtual std::string toString() const final
put the content of the ArcAddition into a string
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
virtual std::string toString() const final
put the content of the ArcDeletion into a string
~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
virtual std::string toString() const final
put the content of the ArcReversal into a string
The class for notifying learning algorithms of new edge additions.
EdgeAddition(EdgeAddition &&from) noexcept
move constructor
virtual std::string toString() const final
put the content of the EdgeAddition into a string
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
virtual std::string toString() const final
put the content of the EdgeDeletion into a string
~EdgeDeletion() noexcept
destructor
EdgeDeletion(EdgeDeletion &&from) noexcept
move constructor
EdgeDeletion(const EdgeDeletion &from) noexcept
copy constructor
GraphChangeType _type_
the type of modification
GraphChange(GraphChangeType type, NodeId node1, NodeId node2) noexcept
default constructor
NodeId node1() const noexcept
returns the first node involved in the 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
GraphChangeType type() const noexcept
returns the type of the operation
GraphChange(const GraphChange &from) noexcept
copy constructor
NodeId node2() const noexcept
returns the second node involved in the modification
~GraphChange() noexcept
destructor
virtual std::string toString() const
put the content of the graph change into a string
GraphChange(GraphChange &&from) noexcept
move constructor
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
gum is the global namespace for all aGrUM entities
Base node set class for graphs.