Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

FloatTestEAEnv Class Reference

Environment for testing FloatGene and BitFloatGene genes. More...

#include <testenv.h>

Inheritance diagram for FloatTestEAEnv:

EAEnvironment List of all members.

Public Methods

 FloatTestEAEnv (const StringMap &params, int dim=2, int funct_b=-1)
void printMathematica2D ()
double calc (const Vector &v, int f)
void changeObjective (int o)
void setGeneType (int vt)
virtual void addFeaturesTo (Genome &genome) const
virtual void init_cycle ()
virtual double evaluateg (const Individual &genome)
virtual void cycle_report (OStream &log, OStream &out)

Protected Attributes

int dim
int func
double par_a
double par_b

Detailed Description

Environment for testing FloatGene and BitFloatGene genes.

Definition at line 79 of file testenv.h.


Constructor & Destructor Documentation

FloatTestEAEnv const StringMap &    params,
int    dim = 2,
int    funct_b = -1
 

Standard constructor.

Parameters:
params  Dynamic parameters in a String Map. Important only for defining ["BitFloatGene.grayCoding"].
dim  Dimension of the search space, i.e. number of floating-point genes in the genome. Genes will gave value range [-4,4]. BitFloatGenes will have 16 bits.
funct_b  ?

Definition at line 95 of file testenv.cc.

References dim, and func.


Member Function Documentation

void addFeaturesTo Genome   genome const [virtual]
 

Adds problem-specific features to a genome.

Reimplemented from EAEnvironment.

Definition at line 102 of file testenv.cc.

References Gentainer::add(), and dim.

double calc const Vector &    v,
int    f
 

Calculates the value of test function with given input vector.

Parameters:
v  Parameter vector.
f  ID of test function.

Definition at line 201 of file testenv.cc.

References func.

Referenced by evaluateg(), and printMathematica2D().

void changeObjective int    o [inline]
 

Changes the objective.

Definition at line 110 of file testenv.h.

virtual void cycle_report OStream &    log,
OStream &    out
[inline, virtual]
 

Prints some statistics or something at the end of the evaluation cycle.

Reimplemented from EAEnvironment.

Definition at line 122 of file testenv.h.

double evaluateg const Individual   indiv [virtual]
 

Evaluates the fitness of the given individual in the environment.

MUST OVERLOAD!

Exceptions:
must_overload 

Reimplemented from EAEnvironment.

Definition at line 193 of file testenv.cc.

References calc(), dim, func, and Individual::getGene().

virtual void init_cycle   [inline, virtual]
 

Initializes a generation.

Not necessary in all models.

Reimplemented from EAEnvironment.

Definition at line 120 of file testenv.h.

void printMathematica2D  
 

Makes an extensive search of all search spaces (functions) in two dimensions.

The output is printed as Mathematica matrices.

Definition at line 226 of file testenv.cc.

References calc().

void setGeneType int    vt [inline]
 

Sets the gene type: name ESFLOAT is FloatGene and name BITFLOAT is BitFloatGene (with 16 bits).

Definition at line 115 of file testenv.h.


Member Data Documentation

int dim [protected]
 

Dimension of search space.

Definition at line 130 of file testenv.h.

Referenced by addFeaturesTo(), evaluateg(), and FloatTestEAEnv().

int func [protected]
 

Function.

Definition at line 133 of file testenv.h.

Referenced by calc(), evaluateg(), and FloatTestEAEnv().

double par_a [protected]
 

Function-dependent parameter.

Definition at line 136 of file testenv.h.

double par_b [protected]
 

Function-dependent parameter.

Definition at line 139 of file testenv.h.


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:12:01 2005 for NeHeP by doxygen1.2.18