angel  mercurial changeset:
angel::gamma_adaption_average_t Class Reference

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

#include <sa.hpp>

List of all members.

Public Member Functions

 gamma_adaption_average_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 sum_diff
int last_min
int last_max
int imp
double scaling

Detailed Description

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

Same as gamma_adaption_max_t with average instead of maximal difference.

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:
gamma_adaption_max_t
ALSA

Definition at line 304 of file sa.hpp.


Constructor & Destructor Documentation

angel::gamma_adaption_average_t::gamma_adaption_average_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 312 of file sa.hpp.

References D, scaling, and THROW_DEBUG_EXCEPT_MACRO.


Member Function Documentation

void angel::gamma_adaption_average_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 322 of file sa.hpp.

References D, imp, last_max, last_min, scaling, and sum_diff.


Member Data Documentation

Definition at line 305 of file sa.hpp.

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

Definition at line 305 of file sa.hpp.

Referenced by operator()().

Definition at line 305 of file sa.hpp.

Referenced by operator()().

Definition at line 305 of file sa.hpp.

Referenced by operator()().

Definition at line 306 of file sa.hpp.

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

Definition at line 305 of file sa.hpp.

Referenced by operator()().


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