com.rubecula.darwin.domain.environment
Class Phenome_Numerical

java.lang.Object
  extended by net.sf.tostring0.AToString
      extended by com.rubecula.darwin.domain.environment.Phenome_
          extended by com.rubecula.darwin.domain.environment.Phenome_Numerical
All Implemented Interfaces:
NumericalTrait, Phenome, net.sf.tostring0.IToString

public class Phenome_Numerical
extends Phenome_
implements NumericalTrait

Lifespan: permanent. Concrete class Phenome_Numerical is a simple implementation of Phenome with the one policy that Traits can be reduced to a numerical value. If there is no appropriate numerical value for a trait, then the Phenome_Gouldian class should be used, not Phenome_Numerical.

TODO this appears to be obsolete -- it can be replaced by Phenome_Gouldian

Since:
V_0_0
Version:
$Revision: 1.14 $
Author:
Robin Hillyard

Field Summary
 
Fields inherited from class com.rubecula.darwin.domain.environment.Phenome_
LOG
 
Fields inherited from interface net.sf.tostring0.IToString
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE
 
Constructor Summary
Phenome_Numerical(FitnessEngine fitnessFunction, NumericalTrait numericalTrait)
          Primary Constructor which invokes the super-constructor for, passing in the fitnessFunction as its argument.
 
Method Summary
 double getTraitValue(java.lang.String trait)
          Method to reduce the value of a trait to a (double) number.
 
Methods inherited from class com.rubecula.darwin.domain.environment.Phenome_
addCharacter, equals, getCharacter, getCharacterKeys, getCharacters, getData, getFitnessEngine, hashCode, setCharacters, setData, size
 
Methods inherited from class net.sf.tostring0.AToString
toString, toString, toStringBrief, toStringId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Phenome_Numerical

public Phenome_Numerical(FitnessEngine fitnessFunction,
                         NumericalTrait numericalTrait)
Primary Constructor which invokes the super-constructor for, passing in the fitnessFunction as its argument.

Parameters:
fitnessFunction - the FitnessEngine.
numericalTrait - an implementer of NumericalTrait.
Method Detail

getTraitValue

public double getTraitValue(java.lang.String trait)
Method to reduce the value of a trait to a (double) number.

Specified by:
getTraitValue in interface NumericalTrait
Parameters:
trait - the name of the trait.
Returns:
the "value" of the trait expressed numerically.
See Also:
NumericalTrait.getTraitValue(java.lang.String)


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.