com.rubecula.darwin.domain.world
Class Attraction_Uniform

java.lang.Object
  extended by com.rubecula.darwin.domain.world.Attraction_
      extended by com.rubecula.darwin.domain.world.Attraction_Uniform
All Implemented Interfaces:
Attraction

public final class Attraction_Uniform
extends Attraction_

Lifespan: permanent. Default implementation of Attraction such that all attractions are unity (i.e. don't affect the mating choice). If you want to implement true sexual selection, you need to extend the Attraction_ type.

Author:
Robin Hillyard

Constructor Summary
Attraction_Uniform()
           
 
Method Summary
 double getAttraction(TraitMap female, TraitMap male)
          Default method for getAttraction.
 boolean isUniform()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attraction_Uniform

public Attraction_Uniform()
Method Detail

getAttraction

public double getAttraction(TraitMap female,
                            TraitMap male)
Default method for getAttraction. All matches are considered equally attractive.

Parameters:
female - the sex-linked traits for the female.
male - the sex-linked traits for the male.
Returns:
1.0
See Also:
Attraction.getAttraction(TraitMap, TraitMap)

isUniform

public boolean isUniform()
Returns:
true if all pairs of trait maps will yield the same attraction value.
See Also:
Attraction.isUniform()


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