angel  mercurial changeset:
angel::gamma_adaption_max_t Class Reference

$\Gamma$ adaption on maximal min-max-difference More...

#include <sa.hpp>

List of all members.

Public Member Functions

 gamma_adaption_max_t (int p_D, double p_scaling=1.0)
 Constructor.
void operator() (int costs, double &gamma)
 Operator, which finally changes $\Gamma$.

Private Attributes

int D
int diff
int max_diff
int last_min
int last_max
int imp
double scaling

Detailed Description

$\Gamma$ adaption on maximal min-max-difference

Between two improvements of the objective functions the maximal (worst) value is subtracted from the minimal (best) value. This difference is computed for D improvements. Then the maximal difference is used as $\Gamma$.

Warning:
In contrast to other operator classes (e.g. neighbor_sequence_check_t), objects of this class can only be used in one run! For another run a new object must be created to set private variables to their initial state.
See also:
ALSA

Definition at line 265 of file sa.hpp.


Constructor & Destructor Documentation

angel::gamma_adaption_max_t::gamma_adaption_max_t ( int  p_D,
double  p_scaling = 1.0 
) [inline]

Constructor.

Parameters:
p_DThe number of improvement before $\Gamma$ is changed
p_scalingScaling factor for $\Gamma$, if omitted 1.0 is taken (no scaling)

Definition at line 273 of file sa.hpp.

References D, scaling, and THROW_DEBUG_EXCEPT_MACRO.


Member Function Documentation

void angel::gamma_adaption_max_t::operator() ( int  costs,
double &  gamma 
) [inline]

Operator, which finally changes $\Gamma$.

Parameters:
costsThe costs (objective function) of current iteration, must be larger than 0
gamma$\Gamma$ in current iteration, may be changed

Definition at line 283 of file sa.hpp.

References D, diff, imp, last_max, last_min, max_diff, and scaling.


Member Data Documentation

Definition at line 266 of file sa.hpp.

Referenced by gamma_adaption_max_t(), and operator()().

Definition at line 266 of file sa.hpp.

Referenced by operator()().

Definition at line 266 of file sa.hpp.

Referenced by operator()().

Definition at line 266 of file sa.hpp.

Referenced by operator()().

Definition at line 266 of file sa.hpp.

Referenced by operator()().

Definition at line 266 of file sa.hpp.

Referenced by operator()().

Definition at line 267 of file sa.hpp.

Referenced by gamma_adaption_max_t(), and operator()().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines