aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::ApproximationSchemeListener Class Referenceabstract

The ApproximationSchemeListener class. More...

#include <approximationSchemeListener.h>

+ Inheritance diagram for gum::ApproximationSchemeListener:
+ Collaboration diagram for gum::ApproximationSchemeListener:

Public Member Functions

 ApproximationSchemeListener (IApproximationSchemeConfiguration &sch)
 Class constructor. More...
 
virtual ~ApproximationSchemeListener ()
 Class destructor. More...
 
virtual void whenProgress (const void *src, const Size step, const double error, const double time)=0
 When progress was made. More...
 
virtual void whenStop (const void *src, const std::string message)=0
 When it stops. More...
 
void _attachSignal_ (__sig__::ISignaler *sender)
 
void _detachSignal_ (__sig__::ISignaler *sender)
 

Protected Member Functions

 ApproximationSchemeListener (const ApproximationSchemeListener &other)
 Copy constructor. More...
 
ApproximationSchemeListeneroperator= (const ApproximationSchemeListener &other)
 Copy operator. More...
 

Detailed Description

The ApproximationSchemeListener class.

Warning
Doxygen does not like spanning command on multiple line, so we could not configure it with the correct include directive. Use the following code snippet to include this file.

Definition at line 50 of file approximationSchemeListener.h.

Constructor & Destructor Documentation

◆ ApproximationSchemeListener() [1/2]

gum::ApproximationSchemeListener::ApproximationSchemeListener ( IApproximationSchemeConfiguration sch)

Class constructor.

Parameters
schThe scheme configuration.

Definition at line 33 of file approximationSchemeListener.cpp.

References gum::Set< Key, Alloc >::emplace().

33  :
34  _sch_(sch) {
35  GUM_CONSTRUCTOR(ApproximationSchemeListener);
36 
39  }
virtual void whenStop(const void *src, const std::string message)=0
When it stops.
ApproximationSchemeListener(IApproximationSchemeConfiguration &sch)
Class constructor.
#define GUM_CONNECT(sender, signal, receiver, target)
Definition: listener.h:96
IApproximationSchemeConfiguration & _sch_
The scheme configuration.
virtual void whenProgress(const void *src, const Size step, const double error, const double time)=0
When progress was made.
+ Here is the call graph for this function:

◆ ~ApproximationSchemeListener()

gum::ApproximationSchemeListener::~ApproximationSchemeListener ( )
virtual

Class destructor.

Definition at line 48 of file approximationSchemeListener.cpp.

References gum::Set< Key, Alloc >::emplace().

48  {
49  GUM_DESTRUCTOR(ApproximationSchemeListener);
50  }
ApproximationSchemeListener(IApproximationSchemeConfiguration &sch)
Class constructor.
+ Here is the call graph for this function:

◆ ApproximationSchemeListener() [2/2]

gum::ApproximationSchemeListener::ApproximationSchemeListener ( const ApproximationSchemeListener other)
protected

Copy constructor.

Definition at line 41 of file approximationSchemeListener.cpp.

References gum::Set< Key, Alloc >::emplace().

42  :
43  _sch_(other._sch_) {
44  GUM_CONS_CPY(ApproximationSchemeListener);
45  GUM_ERROR(OperationNotAllowed, "No copy constructor for ApproximationSchemeListener")
46  }
ApproximationSchemeListener(IApproximationSchemeConfiguration &sch)
Class constructor.
IApproximationSchemeConfiguration & _sch_
The scheme configuration.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51
+ Here is the call graph for this function:

Member Function Documentation

◆ _attachSignal_()

INLINE void gum::Listener::_attachSignal_ ( __sig__::ISignaler *  sender)
inherited

Definition at line 35 of file listener_inl.h.

References gum::Set< Key, Alloc >::emplace().

35 { _senders_.push_back(sender); }
Senders_list _senders_
Definition: listener.h:92
+ Here is the call graph for this function:

◆ _detachSignal_()

INLINE void gum::Listener::_detachSignal_ ( __sig__::ISignaler *  sender)
inherited

Definition at line 37 of file listener_inl.h.

References gum::Set< Key, Alloc >::emplace().

37  {
38  auto del = std::remove(_senders_.begin(), _senders_.end(), sender);
39 
40  if (del != _senders_.end()) _senders_.erase(del, _senders_.end());
41  }
Senders_list _senders_
Definition: listener.h:92
+ Here is the call graph for this function:

◆ operator=()

ApproximationSchemeListener & gum::ApproximationSchemeListener::operator= ( const ApproximationSchemeListener other)
protected

Copy operator.

Definition at line 53 of file approximationSchemeListener.cpp.

References gum::Set< Key, Alloc >::emplace().

53  {
54  GUM_CONS_CPY(ApproximationSchemeListener);
55  GUM_ERROR(OperationNotAllowed, "No copy constructor for ApproximationSchemeListener")
56  }
ApproximationSchemeListener(IApproximationSchemeConfiguration &sch)
Class constructor.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:51
+ Here is the call graph for this function:

◆ whenProgress()

virtual void gum::ApproximationSchemeListener::whenProgress ( const void *  src,
const Size  step,
const double  error,
const double  time 
)
pure virtual

When progress was made.

Parameters
srcThe signal source.
pourcentThe advancement in percent.
errorThe number of errors.
timeThe time.

Implemented in gum::learning::BNLearnerListener.

◆ whenStop()

virtual void gum::ApproximationSchemeListener::whenStop ( const void *  src,
const std::string  message 
)
pure virtual

When it stops.

Parameters
srcThe signal source.
messageA message.

Implemented in gum::learning::BNLearnerListener.

Member Data Documentation

◆ _sch_

IApproximationSchemeConfiguration& gum::ApproximationSchemeListener::_sch_
private

The scheme configuration.

Definition at line 94 of file approximationSchemeListener.h.


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