Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes
rgrl_converge_status_nas Class Reference

Represent the registration status. More...

#include <rgrl_converge_status_nas.h>

Inheritance diagram for rgrl_converge_status_nas:
Inheritance graph
[legend]

List of all members.

Public Types

enum  converge_type { conv_on_going, converged, stagnated }
enum  status_type { status_on_going, good_enough, failed, good_and_terminate }

Public Member Functions

 rgrl_converge_status_nas ()
 default ctor.
 rgrl_converge_status_nas (bool has_converged, bool has_stagnated, bool is_good_enough, bool is_failed, double error, unsigned oscillation_count, double error_diff)
 rgrl_converge_status_nas (rgrl_converge_status const &old)
 copy ctor.
virtual ~rgrl_converge_status_nas ()
int iteration () const
 get iteration number.
void set_iteration (int i)
 set iteration number.
void set_consistency (double c)
 set consistency.
double consistency () const
 consistency.
void set_stability (double c)
 set stability.
double stability () const
 stability.
vnl_vector< double > const & init_scaling_factors () const
 get initial scaling factors.
void set_init_scaling_factors (vnl_vector< double > const &scaling)
 set initial scaling factors.
 rgrl_type_macro (rgrl_converge_status_nas, rgrl_converge_status)
bool has_converged () const
 Return true if the estimation has converged to a viable estimate.
bool has_stagnated () const
 Return true if the estimation has stagnated without reaching a viable estimate.
bool is_good_enough () const
 Return true if the current estimate should be considered "good enough" to solve the problem.
bool is_failed () const
 Return true if the current estimate should be considered "a failure" that would not solve the problem.
bool is_good_and_should_terminate () const
 return true is the current estimate is so good that registration can be terminated.
converge_type current_converge () const
 return converge enum.
status_type current_status () const
 return current status.
void set_current_converge (converge_type c)
 set current coverage.
void set_current_status (status_type s)
 set current coverage.
void set_objective_value (double obj)
 set objective value.
double objective_value () const
 Current value of the objective function.
double error () const
 Same as the objective value.
double error_diff () const
 A signed difference between the error of the current status and the error of the previous.
unsigned int oscillation_count () const
 Return the number of times that the error_diff changes the sign.
 rgrl_type_macro (rgrl_converge_status, rgrl_object)
virtual bool is_type (const vcl_type_info &type) const
void set_debug_flag (unsigned int debugFlag) const
 Set the value of the debug flag. A non-zero value turns debugging on.
unsigned int debug_flag () const
 Get the value of the debug flag.
void set_warning (bool) const
 Set the flag for warning messages.
bool warning () const
 Get the warning flag.
unsigned int add_observer (rgrl_event_sptr event, rgrl_command_sptr)
 Allow people to add/remove/invoke observers (callbacks) to any rgrl object.
rgrl_command_sptr get_command (unsigned int tag)
 Get the command associated with the given tag.
void invoke_event (const rgrl_event &)
 Call execute(.) on all the rgrl_commands observing this event id.
void invoke_event (const rgrl_event &) const
 Call execute(.) on all the rgrl_commands observing this event id.
void remove_observer (unsigned int tag)
 Remove the observer with this tag value.
bool has_observer (const rgrl_event &event) const
 Return true if an observer is registered for this event.
void ref ()
void unref ()
int get_references () const
bool is_referenced () const

Static Public Member Functions

static const vcl_type_info & type_id ()

Protected Attributes

int iteration_
double stability_
double consistency_
vnl_vector< double > init_scaling_factors_
converge_type conv_
status_type status_
double error_
unsigned oscillation_count_
double error_diff_

Detailed Description

Represent the registration status.

Definition at line 19 of file rgrl_converge_status_nas.h.


Member Enumeration Documentation

Enumerator:
conv_on_going 
converged 
stagnated 

Definition at line 24 of file rgrl_converge_status.h.

Enumerator:
status_on_going 
good_enough 
failed 
good_and_terminate 

Definition at line 26 of file rgrl_converge_status.h.


Constructor & Destructor Documentation

rgrl_converge_status_nas::rgrl_converge_status_nas ( )

default ctor.

Definition at line 9 of file rgrl_converge_status_nas.cxx.

rgrl_converge_status_nas::rgrl_converge_status_nas ( bool  has_converged,
bool  has_stagnated,
bool  is_good_enough,
bool  is_failed,
double  error,
unsigned  oscillation_count,
double  error_diff 
)

Definition at line 18 of file rgrl_converge_status_nas.cxx.

rgrl_converge_status_nas::rgrl_converge_status_nas ( rgrl_converge_status const &  old)

copy ctor.

Definition at line 34 of file rgrl_converge_status_nas.cxx.

rgrl_converge_status_nas::~rgrl_converge_status_nas ( ) [virtual]

Definition at line 43 of file rgrl_converge_status_nas.cxx.


Member Function Documentation

unsigned int rgrl_object::add_observer ( rgrl_event_sptr  event,
rgrl_command_sptr  cmd 
) [inherited]

Allow people to add/remove/invoke observers (callbacks) to any rgrl object.

This is an implementation of the subject/observer design pattern. An observer is added by specifying an event to respond to and an rgrl_command to execute. It returns an unsigned long tag which can be used later to remove the event or retrieve the command.

Definition at line 47 of file rgrl_object.cxx.

double rgrl_converge_status_nas::consistency ( ) const [inline]

consistency.

Definition at line 51 of file rgrl_converge_status_nas.h.

rgrl_converge_status::converge_type rgrl_converge_status::current_converge ( ) const [inherited]

return converge enum.

Definition at line 115 of file rgrl_converge_status.cxx.

rgrl_converge_status::status_type rgrl_converge_status::current_status ( ) const [inherited]

return current status.

Definition at line 122 of file rgrl_converge_status.cxx.

unsigned int rgrl_object::debug_flag ( ) const [inherited]

Get the value of the debug flag.

Definition at line 26 of file rgrl_object.cxx.

double rgrl_converge_status::error ( void  ) const [inherited]

Same as the objective value.

Definition at line 158 of file rgrl_converge_status.cxx.

double rgrl_converge_status::error_diff ( ) const [inherited]

A signed difference between the error of the current status and the error of the previous.

Definition at line 174 of file rgrl_converge_status.cxx.

rgrl_command_sptr rgrl_object::get_command ( unsigned int  tag) [inherited]

Get the command associated with the given tag.

Definition at line 57 of file rgrl_object.cxx.

bool rgrl_converge_status::has_converged ( ) const [inherited]

Return true if the estimation has converged to a viable estimate.

Definition at line 78 of file rgrl_converge_status.cxx.

bool rgrl_object::has_observer ( const rgrl_event event) const [inherited]

Return true if an observer is registered for this event.

Definition at line 107 of file rgrl_object.cxx.

bool rgrl_converge_status::has_stagnated ( ) const [inherited]

Return true if the estimation has stagnated without reaching a viable estimate.

Only one of has_converged() and has_stagnated() can be true.

Definition at line 86 of file rgrl_converge_status.cxx.

vnl_vector<double> const& rgrl_converge_status_nas::init_scaling_factors ( ) const [inline]

get initial scaling factors.

Definition at line 62 of file rgrl_converge_status_nas.h.

void rgrl_object::invoke_event ( const rgrl_event event) [inherited]

Call execute(.) on all the rgrl_commands observing this event id.

Definition at line 69 of file rgrl_object.cxx.

void rgrl_object::invoke_event ( const rgrl_event event) const [inherited]

Call execute(.) on all the rgrl_commands observing this event id.

The actions triggered by this call doesn't modify this object.

Definition at line 83 of file rgrl_object.cxx.

bool rgrl_converge_status::is_failed ( ) const [inherited]

Return true if the current estimate should be considered "a failure" that would not solve the problem.

Definition at line 108 of file rgrl_converge_status.cxx.

bool rgrl_converge_status::is_good_and_should_terminate ( ) const [inherited]

return true is the current estimate is so good that registration can be terminated.

Definition at line 101 of file rgrl_converge_status.cxx.

bool rgrl_converge_status::is_good_enough ( ) const [inherited]

Return true if the current estimate should be considered "good enough" to solve the problem.

Definition at line 94 of file rgrl_converge_status.cxx.

virtual bool rgrl_object::is_type ( const vcl_type_info &  type) const [inline, virtual, inherited]

Reimplemented in rgrl_scale_estimator.

Definition at line 66 of file rgrl_object.h.

int rgrl_converge_status_nas::iteration ( ) const [inline]

get iteration number.

Definition at line 42 of file rgrl_converge_status_nas.h.

double rgrl_converge_status::objective_value ( ) const [inherited]

Current value of the objective function.

Lower is better.

Definition at line 150 of file rgrl_converge_status.cxx.

unsigned int rgrl_converge_status::oscillation_count ( ) const [inherited]

Return the number of times that the error_diff changes the sign.

Definition at line 166 of file rgrl_converge_status.cxx.

void rgrl_object::remove_observer ( unsigned int  tag) [inherited]

Remove the observer with this tag value.

Definition at line 97 of file rgrl_object.cxx.

rgrl_converge_status_nas::rgrl_type_macro ( rgrl_converge_status_nas  ,
rgrl_converge_status   
)
rgrl_converge_status::rgrl_type_macro ( rgrl_converge_status  ,
rgrl_object   
) [inherited]
void rgrl_converge_status_nas::set_consistency ( double  c) [inline]

set consistency.

Definition at line 48 of file rgrl_converge_status_nas.h.

void rgrl_converge_status::set_current_converge ( converge_type  c) [inherited]

set current coverage.

Definition at line 129 of file rgrl_converge_status.cxx.

void rgrl_converge_status::set_current_status ( status_type  s) [inherited]

set current coverage.

Definition at line 136 of file rgrl_converge_status.cxx.

void rgrl_object::set_debug_flag ( unsigned int  debugFlag) const [inherited]

Set the value of the debug flag. A non-zero value turns debugging on.

Definition at line 19 of file rgrl_object.cxx.

void rgrl_converge_status_nas::set_init_scaling_factors ( vnl_vector< double > const &  scaling)

set initial scaling factors.

Definition at line 50 of file rgrl_converge_status_nas.cxx.

void rgrl_converge_status_nas::set_iteration ( int  i) [inline]

set iteration number.

Definition at line 45 of file rgrl_converge_status_nas.h.

void rgrl_converge_status::set_objective_value ( double  obj) [inherited]

set objective value.

Definition at line 143 of file rgrl_converge_status.cxx.

void rgrl_converge_status_nas::set_stability ( double  c) [inline]

set stability.

Definition at line 55 of file rgrl_converge_status_nas.h.

void rgrl_object::set_warning ( bool  flag) const [inherited]

Set the flag for warning messages.

Definition at line 33 of file rgrl_object.cxx.

double rgrl_converge_status_nas::stability ( ) const [inline]

stability.

Definition at line 58 of file rgrl_converge_status_nas.h.

static const vcl_type_info& rgrl_object::type_id ( ) [inline, static, inherited]

Reimplemented in rgrl_scale_estimator.

Definition at line 63 of file rgrl_object.h.

bool rgrl_object::warning ( ) const [inherited]

Get the warning flag.

Definition at line 40 of file rgrl_object.cxx.


Member Data Documentation

Definition at line 75 of file rgrl_converge_status_nas.h.

Definition at line 109 of file rgrl_converge_status.h.

double rgrl_converge_status::error_ [protected, inherited]

Definition at line 111 of file rgrl_converge_status.h.

double rgrl_converge_status::error_diff_ [protected, inherited]

Definition at line 113 of file rgrl_converge_status.h.

Definition at line 77 of file rgrl_converge_status_nas.h.

Definition at line 72 of file rgrl_converge_status_nas.h.

unsigned rgrl_converge_status::oscillation_count_ [protected, inherited]

Definition at line 112 of file rgrl_converge_status.h.

Definition at line 74 of file rgrl_converge_status_nas.h.

Definition at line 110 of file rgrl_converge_status.h.


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