53#ifndef DOXYGEN_SHOULD_SKIP_THIS
75 GUM_ERROR(InvalidNode,
"GraphChange " << (
int)(
type_) <<
" does not involve a third node")
87 return std::memcmp(nodes_, from.nodes_, 4 *
sizeof(
LearnNodeId)) == 0;
103 return std::memcmp(nodes_, from.nodes_, 2 *
sizeof(
LearnNodeId)) == 0;
119 return std::memcmp(nodes_, from.nodes_, 2 *
sizeof(
LearnNodeId)) == 0;
135 return std::memcmp(nodes_, from.nodes_, 2 *
sizeof(
LearnNodeId)) == 0;
151 return std::memcmp(nodes_, from.nodes_, 3 *
sizeof(
LearnNodeId)) == 0;
170 return std::memcmp(nodes_, from.nodes_, 3 *
sizeof(
LearnNodeId)) == 0;
189 return std::memcmp(nodes_, from.nodes_, 2 *
sizeof(
LearnNodeId)) == 0;
205 return std::memcmp(nodes_, from.nodes_, 2 *
sizeof(
LearnNodeId)) == 0;
231 const Size*
const nodes = (
const Size*)key.nodes_;
239 return castToSize(key) >> this->right_shift_;
248 const Size*
const nodes = (
Size*)key.nodes_;
256 return castToSize(key) >> this->right_shift_;
265 const Size*
const nodes = (
Size*)key.nodes_;
273 return castToSize(key) >> this->right_shift_;
282 const Size*
const nodes = (
Size*)key.nodes_;
290 return castToSize(key) >> this->right_shift_;
302 const Size*
const nodes = (
const Size*)key.nodes_;
310 return castToSize(key) >> this->right_shift_;
322 const Size*
const nodes = (
const Size*)key.nodes_;
330 return castToSize(key) >> this->right_shift_;
339 const Size*
const nodes = (
Size*)key.nodes_;
347 return castToSize(key) >> this->right_shift_;
356 const Size*
const nodes = (
Size*)key.nodes_;
364 return castToSize(key) >> this->right_shift_;
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
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
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
The class for notifying learning algorithms of arc reversals.
bool operator!=(const ArcReversal &from) const noexcept
returns whether two arc reversals are different or not
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...
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
NodeId node3() const
returns the third node involved in the modification (if any)
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
The class for notifying learning algorithms of edge removals.
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
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
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)
bool operator!=(const GraphChange &from) const noexcept
returns whether two graph changes are different or not
#define GUM_ERROR(type, msg)
the classes to account for structure 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
bool operator==(const HashTableIteratorSafe< Key, Val > &from) const noexcept
Checks whether two iterators are pointing toward equal elements.
static constexpr Size sqrt3
static constexpr Size gold