aGrUM  0.16.0
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 51 of file approximationSchemeListener.h.

Constructor & Destructor Documentation

◆ ApproximationSchemeListener() [1/2]

gum::ApproximationSchemeListener::ApproximationSchemeListener ( IApproximationSchemeConfiguration sch)

Class constructor.

Parameters
schThe scheme configuration.

Definition at line 34 of file approximationSchemeListener.cpp.

References __sch, GUM_CONNECT, whenProgress(), and whenStop().

35  :
36  __sch(sch) {
37  GUM_CONSTRUCTOR(ApproximationSchemeListener);
38 
40  (__sch), onProgress, (*this), ApproximationSchemeListener::whenProgress);
42  }
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:98
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 52 of file approximationSchemeListener.cpp.

References operator=().

52  {
53  GUM_DESTRUCTOR(ApproximationSchemeListener);
54  }
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 44 of file approximationSchemeListener.cpp.

References GUM_ERROR.

45  :
46  __sch(other.__sch) {
47  GUM_CONS_CPY(ApproximationSchemeListener);
48  GUM_ERROR(OperationNotAllowed,
49  "No copy constructor for ApproximationSchemeListener");
50  }
ApproximationSchemeListener(IApproximationSchemeConfiguration &sch)
Class constructor.
IApproximationSchemeConfiguration & __sch
The scheme configuration.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55

Member Function Documentation

◆ attachSignal__()

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

Definition at line 36 of file listener_inl.h.

References gum::Listener::__senders.

36  {
37  __senders.push_back(sender);
38  }
Senders_list __senders
Definition: listener.h:94

◆ detachSignal__()

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

Definition at line 40 of file listener_inl.h.

References gum::Listener::__senders.

40  {
41  auto del = std::remove(__senders.begin(), __senders.end(), sender);
42 
43  if (del != __senders.end()) __senders.erase(del, __senders.end());
44  }
Senders_list __senders
Definition: listener.h:94

◆ operator=()

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

Copy operator.

Definition at line 57 of file approximationSchemeListener.cpp.

References GUM_ERROR.

Referenced by ~ApproximationSchemeListener().

57  {
58  GUM_CONS_CPY(ApproximationSchemeListener);
59  GUM_ERROR(OperationNotAllowed,
60  "No copy constructor for ApproximationSchemeListener");
61  }
ApproximationSchemeListener(IApproximationSchemeConfiguration &sch)
Class constructor.
#define GUM_ERROR(type, msg)
Definition: exceptions.h:55
+ Here is the caller 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.

Referenced by ApproximationSchemeListener().

+ Here is the caller graph for this function:

◆ 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.

Referenced by ApproximationSchemeListener().

+ Here is the caller graph for this function:

Member Data Documentation

◆ __sch

IApproximationSchemeConfiguration& gum::ApproximationSchemeListener::__sch
private

The scheme configuration.

Definition at line 97 of file approximationSchemeListener.h.

Referenced by ApproximationSchemeListener().


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