GenomeType - Type of genome used to represent a single element in the
genetic population, such as a Vector, for example.@CodeReview(reviewer="Kevin R. Dixon",date="2008-07-23",changesNeeded=true,comments={"I think this class should be replaced by InputOutputPair<GenomeType,Double>","It doesn\'t really serve a useful purpose anymore.","Replaced previous code review with CodeReview annotation."},response=@CodeReviewResponse(respondent="Justin Basilico",date="2008-09-15",moreChangesNeeded=false,comments={"InputOutputPair is meant for supervised learning","I added the Pair interface to the class, since it is a pair.","I prefer having a some semantically meaningful class name and properties rather than using the vague Pair or InputOutputPair."})) @CodeReview(reviewer="Justin Basilico",date="2006-10-02",changesNeeded=false,comments="This simple container class looks fine.") public class EvaluatedGenome<GenomeType> extends java.lang.Object implements Pair<GenomeType,java.lang.Double>, java.io.Serializable
| Constructor and Description |
|---|
EvaluatedGenome(double cost,
GenomeType genome)
Creates a new instance of EvaluatedGenome.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getCost()
Gets the cost of the genome.
|
GenomeType |
getFirst()
The first entry in the pair is the genome.
|
GenomeType |
getGenome()
Gets the genome.
|
java.lang.Double |
getSecond()
The second entry in the pair is the cost.
|
void |
setCost(double cost)
Sets the cost of the genome.
|
void |
setGenome(GenomeType genome)
Sets the genome.
|
public EvaluatedGenome(double cost,
GenomeType genome)
genome - The genome.cost - The cost associated with the genome.public GenomeType getGenome()
public double getCost()
public void setGenome(GenomeType genome)
genome - The new genome.public void setCost(double cost)
cost - The new cost.public GenomeType getFirst()
getFirst in interface Pair<GenomeType,java.lang.Double>public java.lang.Double getSecond()
getSecond in interface Pair<GenomeType,java.lang.Double>