ca.quine.jcommons.transform.ga
Class GAFitnessEvaluator
java.lang.Object
|
+--ca.quine.jcommons.transform.ga.GAFitnessEvaluator
- All Implemented Interfaces:
- GAFramework.Evaluator
- public class GAFitnessEvaluator
- extends Object
- implements GAFramework.Evaluator
Method Summary |
double |
evalFitness(double objfun)
Evaluate the fitness of some individual given its
objective function value. |
double |
evalFitness(Vector data)
Evaluate the fitness of some individual given its
genetic data (chromosome) or its phenotype. |
double |
evalObjFun(Vector data)
Evaluate the objective function given the chromosome
or the phenotype of some individual. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GAFitnessEvaluator
public GAFitnessEvaluator(TransformNode inputNode,
String[] outputTypes,
TransformGraph graph)
evalObjFun
public double evalObjFun(Vector data)
- Description copied from interface:
GAFramework.Evaluator
- Evaluate the objective function given the chromosome
or the phenotype of some individual.
- Specified by:
evalObjFun
in interface GAFramework.Evaluator
- Parameters:
data
- is the vector with the genetic data
(chromosome) or the phenotype of some individual. If
Individual.GENOT
has been passed to the
constructor of GenerationProcess
, then
data
is interpreted as the chromosome. If
Individual.PHENOT
was used instead, then
the argument data
is interpreted as the
phenotype.
- Returns:
- a double value with the objective function
evaluation.
evalFitness
public double evalFitness(Vector data)
- Description copied from interface:
GAFramework.Evaluator
- Evaluate the fitness of some individual given its
genetic data (chromosome) or its phenotype. If this
signature is used for the fitness evaluation
implementation, according to the problem to be
solved, then the another version must be a "do
nothing" method.
- Specified by:
evalFitness
in interface GAFramework.Evaluator
- Parameters:
data
- is the chromosome or the phenotype of some
individual.If Individual.GENOT
has been
passed to the constructor of
GenerationProcess
, then data
is interpreted as the chromosome. If
Individual.PHENOT
was used instead, then
the argument data
is interpreted as the
phenotype.
- Returns:
- a double with the individual fitness.
- See Also:
Evaluator.evalFitness(double)
evalFitness
public double evalFitness(double objfun)
- Description copied from interface:
GAFramework.Evaluator
- Evaluate the fitness of some individual given its
objective function value. If this
signature is used for the fitness evaluation
implementation, according to the problem to be
solved, then the another version must be a "do
nothing" method.
- Specified by:
evalFitness
in interface GAFramework.Evaluator
- Parameters:
objfun
- is the value of objective function
obtained by some individual.
- Returns:
- a double with the individual fitness.
- See Also:
Evaluator.evalFitness(Vector)