Public Member Functions | |
BoxAnneal (const char *params="") | |
bool | stop () |
int | check_for_overlap () |
void | wiggle () |
void | best_found () |
float | energy () |
Public Attributes | |
int | no_of_nodes |
int | N |
vector< Box > | nodes |
vector< Box > | best_nodes |
This annealing class tries to put N square boxes in the smallest square containing them.
BoxAnneal::BoxAnneal | ( | const char * | params = "" |
) | [inline] |
params - like BasicAnneal. Addionally N - Number of Boxes
References Box::ang, Box::c, and BasicAnneal::std_init().
bool BoxAnneal::stop | ( | ) | [inline, virtual] |
Reimplemented stop criterion.
Reimplemented from BasicAnneal.
int BoxAnneal::check_for_overlap | ( | ) | [inline] |
Check wheter our boxes overlap.
Referenced by wiggle().
void BoxAnneal::wiggle | ( | ) | [inline, virtual] |
void BoxAnneal::best_found | ( | ) | [inline, virtual] |
This gets called each time anneal finds a new best energy.
Reimplemented from BasicAnneal.
References BasicAnneal::best_found().
float BoxAnneal::energy | ( | ) | [inline, virtual] |
Compute square surrounding the current boxes and use the edge size as energy.
Reimplemented from BasicAnneal.