SampleAnneal Class Reference
[dotrepulsion]

Example how to use BaseAnneal. More...

Inheritance diagram for SampleAnneal:

BasicAnneal

List of all members.

Public Member Functions

 SampleAnneal (const char *params="")
bool stop ()
void best_found ()
float energy ()

Public Attributes

int no_of_nodes
int N
vector< float > nodes
vector< float > best_nodes


Detailed Description

Example how to use BaseAnneal.

An example annealing class that inherits BasicAnneal. For N points $fx_i$f in 2D, we want to minimize the energy $E=\sum_{i,j=1}^N (2-dist(x_i,x_j))^2$, where dist is the euclidean distance between two points.


Constructor & Destructor Documentation

SampleAnneal::SampleAnneal ( const char *  params = ""  )  [inline]

params - like BasicAnneal. Addionally N - Number of points

References BasicAnneal::std_init().


Member Function Documentation

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

Stop criterion.

Reimplemented from BasicAnneal.

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

This is called when a smaller Energy is found. Writes current coordinates to file best_filename.

Reimplemented from BasicAnneal.

References BasicAnneal::best_found().

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

The energy for this problem. We want the euclidean distance (dist) between N points to be 2! Which means that the energy is $E=\sum_{i,j=1}^N (2-dist(x_i,x_j))^2$.

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