public abstract class RealScalarFunctionChromosome extends 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.
|
String |
toString() |
ImmutableVector |
x()
Get the candidate solution.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
crossover, mutate
public RealScalarFunctionChromosome(RealScalarFunction f, Vector x)
RealScalarFunctionChromosome
.f
- the objective functionx
- a candidate solutionpublic RealScalarFunction f()
public ImmutableVector x()
public double fitness()
Chromosome
fitness
in interface Chromosome
public int compareTo(Chromosome that)
compareTo
in interface Comparable<Chromosome>
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.