Public Member Functions | Static Public Member Functions
msm_param_limiter Class Reference

Base for objects with apply limits to parameters. More...

#include <msm_param_limiter.h>

Inheritance diagram for msm_param_limiter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual ~msm_param_limiter ()
virtual void set_param_var (const vnl_vector< double > &v)=0
 Define variance on each parameter.
virtual void set_acceptance (double prop, unsigned n_modes=0)=0
 Set the limits so that a given proportion pass.
virtual void apply_limit (vnl_vector< double > &b) const =0
 Apply limit to parameter vector b.
virtual vcl_string is_a () const =0
 Name of the class.
virtual msm_param_limiterclone () const =0
 Create a copy on the heap and return base class pointer.
virtual void print_summary (vcl_ostream &os) const =0
 Print class to os.
virtual void b_write (vsl_b_ostream &bfs) const =0
 Save class to binary file stream.
virtual void b_read (vsl_b_istream &bfs)=0
 Load class from binary file stream.
virtual void config_from_stream (vcl_istream &is)
 Initialise from a text stream.

Static Public Member Functions

static vcl_auto_ptr
< msm_param_limiter
create_from_stream (vcl_istream &is)
 Create a concrete msm_param_limiter-derived object, from a text specification.

Detailed Description

Base for objects with apply limits to parameters.

Derived classes implement apply_limit(b) function, which applies constraints to vector b based on variances.

Definition at line 17 of file msm_param_limiter.h.


Constructor & Destructor Documentation

virtual msm_param_limiter::~msm_param_limiter ( ) [inline, virtual]

Definition at line 21 of file msm_param_limiter.h.


Member Function Documentation

virtual void msm_param_limiter::apply_limit ( vnl_vector< double > &  b) const [pure virtual]

Apply limit to parameter vector b.

Implemented in msm_ellipsoid_limiter, msm_box_limiter, and msm_no_limiter.

virtual void msm_param_limiter::b_read ( vsl_b_istream bfs) [pure virtual]

Load class from binary file stream.

Implemented in msm_ellipsoid_limiter, msm_box_limiter, and msm_no_limiter.

virtual void msm_param_limiter::b_write ( vsl_b_ostream bfs) const [pure virtual]

Save class to binary file stream.

Implemented in msm_ellipsoid_limiter, msm_box_limiter, and msm_no_limiter.

virtual msm_param_limiter* msm_param_limiter::clone ( ) const [pure virtual]

Create a copy on the heap and return base class pointer.

Implemented in msm_ellipsoid_limiter, msm_box_limiter, and msm_no_limiter.

void msm_param_limiter::config_from_stream ( vcl_istream &  is) [virtual]

Initialise from a text stream.

The default implementation is for attribute-less normalisers, and throws if it finds any data in the stream.

Reimplemented in msm_ellipsoid_limiter, and msm_box_limiter.

Definition at line 33 of file msm_param_limiter.cxx.

vcl_auto_ptr< msm_param_limiter > msm_param_limiter::create_from_stream ( vcl_istream &  is) [static]

Create a concrete msm_param_limiter-derived object, from a text specification.

Definition at line 47 of file msm_param_limiter.cxx.

virtual vcl_string msm_param_limiter::is_a ( ) const [pure virtual]

Name of the class.

Implemented in msm_ellipsoid_limiter, msm_box_limiter, and msm_no_limiter.

virtual void msm_param_limiter::print_summary ( vcl_ostream &  os) const [pure virtual]

Print class to os.

Implemented in msm_ellipsoid_limiter, msm_box_limiter, and msm_no_limiter.

virtual void msm_param_limiter::set_acceptance ( double  prop,
unsigned  n_modes = 0 
) [pure virtual]

Set the limits so that a given proportion pass.

Where the parameters are described by a pdf, choose limits so that on average a proportion prop (in [0,1]) are acceptable when using n_modes modes. If n_modes==0, then assume all available modes to be used.

Implemented in msm_ellipsoid_limiter, msm_box_limiter, and msm_no_limiter.

virtual void msm_param_limiter::set_param_var ( const vnl_vector< double > &  v) [pure virtual]

Define variance on each parameter.

Implemented in msm_ellipsoid_limiter, msm_box_limiter, and msm_no_limiter.


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