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< Vec2 > | orig |
vector< Vec2 > | nodes |
vector< Vec2 > | best_nodes |
Here we try to fit a monotonic function through a given set of points with periodic boundary conditions at both sides (x and y).
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().
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 , where y_i are the sample points, inter is a linear interpolation of the fitted points we currently have.
Reimplemented from BasicAnneal.