aGrUM  0.13.2
gum::learning::EdgeDeletion Class Reference

The class for notifying learning algorithms of edge removalsThis class is convenient to know at compile time which graph change we are dealing with. More...

#include <graphChange.h>

+ Inheritance diagram for gum::learning::EdgeDeletion:
+ Collaboration diagram for gum::learning::EdgeDeletion:

Public Member Functions

Constructors / Destructors
 EdgeDeletion (NodeId node1, NodeId node2) noexcept
 default constructor More...
 
 EdgeDeletion (const EdgeDeletion &from) noexcept
 copy constructor More...
 
 EdgeDeletion (EdgeDeletion &&from) noexcept
 move constructor More...
 
 ~EdgeDeletion () noexcept
 destructor More...
 
Operators
EdgeDeletionoperator= (const EdgeDeletion &from) noexcept
 copy constructor More...
 
EdgeDeletionoperator= (EdgeDeletion &&from) noexcept
 move operator More...
 
bool operator== (const EdgeDeletion &from) const noexcept
 returns whether two edge deletions are identical or not More...
 
bool operator!= (const EdgeDeletion &from) const noexcept
 returns whether two edge deletions are different or not More...
 
Accessors / Modifiers
virtual std::string toString () const final
 put the content of the EdgeDeletion into a string More...
 
Operators
bool operator== (const GraphChange &from) const noexcept
 returns whether two graph changes are identical or not More...
 
bool operator!= (const GraphChange &from) const noexcept
 returns whether two graph changes are different or not More...
 
Accessors/Modifiers
GraphChangeType type () const noexcept
 returns the type of the operation More...
 
NodeId node1 () const noexcept
 returns the first node involved in the modification More...
 
NodeId node2 () const noexcept
 returns the second node involved in the modification More...
 

Detailed Description

The class for notifying learning algorithms of edge removals

This class is convenient to know at compile time which graph change we are dealing with.

Thus, this enables to perform faster code (we can avoid using a switch on GraphChanges to determine which change corresponds to this class.

Definition at line 411 of file graphChange.h.

Constructor & Destructor Documentation

gum::learning::EdgeDeletion::EdgeDeletion ( NodeId  node1,
NodeId  node2 
)
noexcept

default constructor

gum::learning::EdgeDeletion::EdgeDeletion ( const EdgeDeletion from)
noexcept

copy constructor

gum::learning::EdgeDeletion::EdgeDeletion ( EdgeDeletion &&  from)
noexcept

move constructor

gum::learning::EdgeDeletion::~EdgeDeletion ( )
noexcept

destructor

Member Function Documentation

bool gum::learning::GraphChange::operator!= ( const GraphChange from) const
noexceptinherited

returns whether two graph changes are different or not

bool gum::learning::EdgeDeletion::operator!= ( const EdgeDeletion from) const
noexcept

returns whether two edge deletions are different or not

EdgeDeletion& gum::learning::EdgeDeletion::operator= ( const EdgeDeletion from)
noexcept

copy constructor

EdgeDeletion& gum::learning::EdgeDeletion::operator= ( EdgeDeletion &&  from)
noexcept

move operator

bool gum::learning::GraphChange::operator== ( const GraphChange from) const
noexceptinherited

returns whether two graph changes are identical or not

bool gum::learning::EdgeDeletion::operator== ( const EdgeDeletion from) const
noexcept

returns whether two edge deletions are identical or not

std::string gum::learning::EdgeDeletion::toString ( ) const
finalvirtual

put the content of the EdgeDeletion into a string

Reimplemented from gum::learning::GraphChange.

Definition at line 98 of file graphChange.cpp.

References gum::learning::GraphChange::node1(), and gum::learning::GraphChange::node2().

Referenced by gum::learning::operator<<().

98  {
99  std::stringstream stream;
100  stream << "EdgeDeletion ( " << node1() << " , " << node2() << " )";
101  return stream.str();
102  }
NodeId node2() const noexcept
returns the second node involved in the modification
NodeId node1() const noexcept
returns the first node involved in the modification

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

GraphChangeType gum::learning::GraphChange::type ( ) const
noexceptinherited

returns the type of the operation

Referenced by gum::learning::GreedyHillClimbing::learnStructure(), gum::learning::LocalSearchWithTabuList::learnStructure(), and gum::learning::GraphChange::toString().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: