eoEvalFuncPtr(3)

NAME
eoEvalFuncPtr - EOEvalFuncPtr: This class takes an existing function pointer and converts it into a evaluation function class.

SYNOPSIS

#include <eoEvalFuncPtr.h>

Inherits eoEvalFunc< EOT >< EOT >.

  Public Member Functions
eoEvalFuncPtr (FitT(*_eval)(FunctionArg))
Applies the function to the chromosome and sets the fitness of the Chrom.
virtual void operator() (EOT &_eo)
Effectively applies the evaluation function to an EO.

  Private Attributes
FitT(* evalFunc )(FunctionArg)

Detailed Description

  template<class EOT, class FitT = typename EOT::Fitness, class FunctionArg = const EOT&> struct eoEvalFuncPtr< EOT, FitT, FunctionArg >
EOEvalFuncPtr: This class takes an existing function pointer and converts it into a evaluation function class. That way, old style C or C++ functions can be adapted to EO function classes.

Definition at line 43 of file eoEvalFuncPtr.h.

Constructor & Destructor Documentation

  template<class EOT, class FitT = typename EOT::Fitness, class FunctionArg = const EOT&> eoEvalFuncPtr< EOT, FitT, FunctionArg >::eoEvalFuncPtr (FitT(*)(FunctionArg) _eval) [inline]

Applies the function to the chromosome and sets the fitness of the Chrom.

Thus, the evaluation function need not be worried about that.

Parameters:
    _eval pointer to the evaluation function, takes a EOT as an argument and returns the fitness

Returns:
    the evaluated fitness for that object.

Definition at line 51 of file eoEvalFuncPtr.h.

Author

Generated automatically by Doxygen for EO from the source code.