FittingAnneal Class Reference
[fitting]

Fit a curve through given points. More...

Inheritance diagram for FittingAnneal:

BasicAnneal

List of all members.

Public Member Functions

float interpolate (float s)
void dumpVectors ()
ostream & show_config (ostream &out)
void log ()
 FittingAnneal (const char *filename, const char *params="")
bool stop ()
void best_found ()
float energy ()

Public Attributes

string resume_from
int resample
int no_of_nodes
vector< Vec2orig
vector< Vec2nodes
vector< Vec2best_nodes


Detailed Description

Fit a curve through given points.

Here we try to fit a monotonic function through a given set of points with periodic boundary conditions at both sides (x and y).


Constructor & Destructor Documentation

FittingAnneal::FittingAnneal ( const char *  filename,
const char *  params = "" 
) [inline]

params - like BasicAnneal. Addionally filename - curve to be fitted no_of_nodes - Number of points resume_from - File containing a previous run. resample - If we resume from a file. Resample it with that num of points.

References BasicAnneal::std_init().


Member Function Documentation

ostream& FittingAnneal::show_config ( ostream &  out  )  [inline, virtual]

Show the configuration parameters.

Reimplemented from BasicAnneal.

References BasicAnneal::show_config().

void FittingAnneal::log (  )  [inline, virtual]

Perfomr a logging action (uses logline) but can be reimplemented in derived classes.

Reimplemented from BasicAnneal.

References BasicAnneal::logline().

bool FittingAnneal::stop (  )  [inline, virtual]

Returns true when annealing considers to have converged.

Reimplemented from BasicAnneal.

void FittingAnneal::best_found (  )  [inline, virtual]

This gets called each time anneal finds a new best energy.

Reimplemented from BasicAnneal.

References BasicAnneal::best_found(), and BasicAnneal::update_minmax_step().

float FittingAnneal::energy (  )  [inline, virtual]

The energy is $\sum_{i=1}^N (y_i - inter(f(x_i)))^2$, where y_i are the sample points, inter is a linear interpolation of the fitted points we currently have.

Reimplemented from BasicAnneal.


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

Generated on Mon Feb 8 17:22:36 2010 for libbiarc by  doxygen 1.5.6