104 if (
this != &from) { std::memcpy(
nodes_, from.nodes_, 4 *
sizeof(
LearnNodeId)); }
276 return std::format(
"ArcAddition ( {} , {} )",
node1(),
node2());
279 return std::format(
"ArcDeletion ( {} , {} )",
node1(),
node2());
282 return std::format(
"ArcReversal ( {} , {} )",
node1(),
node2());
285 return std::format(
"ArcTriangleDeletion1 ( {} , {} , {} )",
node1(),
node2(),
node3());
288 return std::format(
"ArcTriangleDeletion2 ( {} , {} , {} )",
node1(),
node2(),
node3());
291 return std::format(
"EdgeAddition ( {} , {} )",
node1(),
node2());
294 return std::format(
"EdgeDeletion ( {} , {} )",
node1(),
node2());
298 "Graph modification " << (
int)
type() <<
" is not supported yet in method toString")
320 "Graph modification " << (
int)
type()
321 <<
" is not supported yet in method typeAsString")
Exception : operation not allowed.
The class for notifying learning algorithms of new arc additions.
ArcAddition & operator=(const ArcAddition &from) noexcept
copy constructor
ArcAddition(NodeId node1, NodeId node2) noexcept
default constructor
~ArcAddition() noexcept
destructor
The class for notifying learning algorithms of arc removals.
ArcDeletion(NodeId node1, NodeId node2) noexcept
default constructor
ArcDeletion & operator=(const ArcDeletion &from) noexcept
copy constructor
~ArcDeletion() noexcept
destructor
The class for notifying learning algorithms of arc reversals.
ArcReversal & operator=(const ArcReversal &from) noexcept
copy constructor
ArcReversal(NodeId node1, NodeId node2) noexcept
default constructor
~ArcReversal() noexcept
destructor
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)
~ArcTriangleDeletion1() noexcept
destructor
The graph change substituting a triangle node1->node2->node3 + node1->node3 into v-structure node1->n...
ArcTriangleDeletion2 & operator=(const ArcTriangleDeletion2 &from) noexcept
copy constructor
~ArcTriangleDeletion2() noexcept
destructor
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.
EdgeAddition & operator=(const EdgeAddition &from) noexcept
copy constructor
EdgeAddition(NodeId node1, NodeId node2) noexcept
default constructor
~EdgeAddition() noexcept
destructor
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
~EdgeDeletion() noexcept
destructor
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
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)
~GraphChange() noexcept
destructor
std::string toString() const
put the content of the graph change into a string
#define GUM_ERROR(type, msg)
the classes to account for structure changes in a graph
A class to account for changes in a graph.
Size NodeId
Type for node ids.
include the inlined functions if necessary
std::ostream & operator<<(std::ostream &stream, const IdCondSet &idset)
the display operator
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