|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.uncommons.watchmaker.framework.EvaluatedCandidate<T>
T - The candidate type.public final class EvaluatedCandidate<T>
Immutable wrapper class for associating a candidate solution with its fitness score.
| Constructor Summary | |
|---|---|
EvaluatedCandidate(T candidate,
double fitness)
|
|
| Method Summary | |
|---|---|
int |
compareTo(EvaluatedCandidate<T> evaluatedCandidate)
Compares this candidate's fitness score with that of the specified candidate. |
boolean |
equals(Object o)
Over-ridden to be consistent with compareTo(EvaluatedCandidate). |
T |
getCandidate()
|
double |
getFitness()
|
int |
hashCode()
Over-ridden to be consistent with equals(Object). |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EvaluatedCandidate(T candidate,
double fitness)
candidate - The evolved candidate.fitness - The candidates fitness score.| Method Detail |
|---|
public T getCandidate()
public double getFitness()
public int compareTo(EvaluatedCandidate<T> evaluatedCandidate)
compareTo in interface Comparable<EvaluatedCandidate<T>>evaluatedCandidate - The candidate to compare scores with.
public boolean equals(Object o)
compareTo(EvaluatedCandidate).
equals in class Objecto - The object to check for equality.
public int hashCode()
equals(Object).
hashCode in class Object
|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||