public abstract class RealScalarFunctionChromosome extends java.lang.Object implements Chromosome
| Constructor and Description |
|---|
RealScalarFunctionChromosome(RealScalarFunction f,
Vector x)
Construct an instance of
RealScalarFunctionChromosome. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Chromosome that) |
RealScalarFunction |
f()
Get the objective function.
|
double |
fitness()
This is the fitness to determine how good this chromosome is.
|
java.lang.String |
toString() |
ImmutableVector |
x()
Get the candidate solution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcrossover, mutatepublic RealScalarFunctionChromosome(RealScalarFunction f, Vector x)
RealScalarFunctionChromosome.f - the objective functionx - a candidate solutionpublic RealScalarFunction f()
public ImmutableVector x()
public double fitness()
Chromosomefitness in interface Chromosomepublic int compareTo(Chromosome that)
compareTo in interface java.lang.Comparable<Chromosome>public java.lang.String toString()
toString in class java.lang.Object