com.rubecula.darwin.domain.helper
Interface Phenotype

All Superinterfaces:
CacheSignature, Censusible, Fit, net.sf.tostring0.Identifiable, net.sf.tostring0.IToString, TraitMap
All Known Implementing Classes:
Phenotype_, Phenotype_Dawkinsian, Phenotype_TS

public interface Phenotype
extends Fit, net.sf.tostring0.IToString, TraitMap, net.sf.tostring0.Identifiable

Defines the methods supported by instances of Phenotype interface. The phenotype can be evaluated for fitness in the context of an environment. It can also be evaluated for attraction in the context of a sexual mating ("sexual selection").
A phenotype consists of a Set of Traits backed by HashMap. The set of traits is defined by the system's Phenome.

TODO consider renaming this family of types as Phenome...

Version:
$Revision: 1.16 $
Author:
Robin Hillyard

Field Summary
 
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
 
Method Summary
 void addExtended(ExPhen expression)
           
 java.lang.String addTrait(java.lang.String key, Trait trait)
           
 java.lang.String addTrait(Trait trait)
          Add the given trait to this Phenotype.
 void doCensus(Pharacter character, FrequencyMap<Trait> traitFrequencies)
           
 java.util.Collection<ExPhen> getExtendedPhenotypes()
           
 TraitMap getSexTraits()
           
 
Methods inherited from interface net.sf.tostring0.IToString
toString, toStringBrief, toStringId
 
Methods inherited from interface com.rubecula.darwin.domain.helper.TraitMap
getKeys, getTrait, getTraits, size
 
Methods inherited from interface com.rubecula.darwin.domain.helper.CacheSignature
getSignature
 
Methods inherited from interface com.rubecula.darwin.domain.helper.Censusible
censusMe, getCensusibleChildren
 
Methods inherited from interface net.sf.tostring0.Identifiable
getIdentifier
 

Method Detail

addExtended

void addExtended(ExPhen expression)
Parameters:
expression -

addTrait

java.lang.String addTrait(java.lang.String key,
                          Trait trait)
Parameters:
key -
trait -
Returns:
the key of the newly added trait

addTrait

java.lang.String addTrait(Trait trait)
Add the given trait to this Phenotype.

Parameters:
trait - the trait.
Returns:
the key that this trait is indexed under.

doCensus

void doCensus(Pharacter character,
              FrequencyMap<Trait> traitFrequencies)
Parameters:
character -
traitFrequencies -

getExtendedPhenotypes

java.util.Collection<ExPhen> getExtendedPhenotypes()
Returns:
a collection of extended phenotype, ExPhen, objects.

getSexTraits

TraitMap getSexTraits()
Returns:
the sex-linked traits as a TraitMap


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