Public Member Functions | Private Attributes
mfpf_ssd_vec_cost Class Reference

Computes weighted sum of square differences to a mean. More...

#include <mfpf_ssd_vec_cost.h>

Inheritance diagram for mfpf_ssd_vec_cost:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 mfpf_ssd_vec_cost ()
 Dflt ctor.
virtual ~mfpf_ssd_vec_cost ()
 Destructor.
void set (const vnl_vector< double > &mean, const vnl_vector< double > &wts)
 Define mean and weights.
const vnl_vector< double > & mean () const
 Mean for vector.
const vnl_vector< double > & wts () const
 Weights to apply to each element in sum.
virtual double evaluate (const vnl_vector< double > &v)
 Evaluate weighted sum of absolute difference from mean.
virtual void get_average (vnl_vector< double > &v) const
 Return the mean.
short version_no () const
 Version number for I/O.
virtual vcl_string is_a () const
 Name of the class.
virtual mfpf_vec_costclone () const
 Create a copy on the heap and return base class pointer.
virtual void print_summary (vcl_ostream &os) const
 Print class to os.
virtual void b_write (vsl_b_ostream &bfs) const
 Save class to binary file stream.
virtual void b_read (vsl_b_istream &bfs)
 Load class from binary file stream.

Private Attributes

vnl_vector< double > mean_
 Mean for vector.
vnl_vector< double > wts_
 Weights to apply to each element in sum.

Detailed Description

Computes weighted sum of square differences to a mean.

Definition at line 12 of file mfpf_ssd_vec_cost.h.


Constructor & Destructor Documentation

mfpf_ssd_vec_cost::mfpf_ssd_vec_cost ( )

Dflt ctor.

Definition at line 16 of file mfpf_ssd_vec_cost.cxx.

mfpf_ssd_vec_cost::~mfpf_ssd_vec_cost ( ) [virtual]

Destructor.

Definition at line 24 of file mfpf_ssd_vec_cost.cxx.


Member Function Documentation

void mfpf_ssd_vec_cost::b_read ( vsl_b_istream bfs) [virtual]

Load class from binary file stream.

Implements mfpf_vec_cost.

Definition at line 103 of file mfpf_ssd_vec_cost.cxx.

void mfpf_ssd_vec_cost::b_write ( vsl_b_ostream bfs) const [virtual]

Save class to binary file stream.

Implements mfpf_vec_cost.

Definition at line 92 of file mfpf_ssd_vec_cost.cxx.

mfpf_vec_cost * mfpf_ssd_vec_cost::clone ( ) const [virtual]

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

Implements mfpf_vec_cost.

Definition at line 74 of file mfpf_ssd_vec_cost.cxx.

double mfpf_ssd_vec_cost::evaluate ( const vnl_vector< double > &  v) [virtual]

Evaluate weighted sum of absolute difference from mean.

Implements mfpf_vec_cost.

Definition at line 38 of file mfpf_ssd_vec_cost.cxx.

void mfpf_ssd_vec_cost::get_average ( vnl_vector< double > &  v) const [virtual]

Return the mean.

Implements mfpf_vec_cost.

Definition at line 49 of file mfpf_ssd_vec_cost.cxx.

vcl_string mfpf_ssd_vec_cost::is_a ( ) const [virtual]

Name of the class.

Reimplemented from mfpf_vec_cost.

Definition at line 68 of file mfpf_ssd_vec_cost.cxx.

const vnl_vector<double>& mfpf_ssd_vec_cost::mean ( ) const [inline]

Mean for vector.

Definition at line 34 of file mfpf_ssd_vec_cost.h.

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

Print class to os.

Implements mfpf_vec_cost.

Definition at line 83 of file mfpf_ssd_vec_cost.cxx.

void mfpf_ssd_vec_cost::set ( const vnl_vector< double > &  mean,
const vnl_vector< double > &  wts 
)

Define mean and weights.

Definition at line 29 of file mfpf_ssd_vec_cost.cxx.

short mfpf_ssd_vec_cost::version_no ( ) const

Version number for I/O.

Reimplemented from mfpf_vec_cost.

Definition at line 59 of file mfpf_ssd_vec_cost.cxx.

const vnl_vector<double>& mfpf_ssd_vec_cost::wts ( ) const [inline]

Weights to apply to each element in sum.

Definition at line 37 of file mfpf_ssd_vec_cost.h.


Member Data Documentation

Mean for vector.

Definition at line 16 of file mfpf_ssd_vec_cost.h.

Weights to apply to each element in sum.

Definition at line 19 of file mfpf_ssd_vec_cost.h.


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