T - the parameter needs to have the concrete type of the hypothesis class
for the methods to return the correct subtype.public abstract class AbstractHypothesis<T extends AbstractHypothesis> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Random |
RANDOM
The source of randomness that can be used in the hypothesis.
|
| Constructor and Description |
|---|
AbstractHypothesis() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract double |
calculateFitness()
Calculates the fitness of this hypothesis.
|
protected abstract List<T> |
crossOver(T other)
Returns a two-element crossover offspring of this and the other hypothesis.
|
protected abstract void |
mutate()
Implements the mutation operator.
|
protected abstract T |
randomInit()
Randomly initialize the hypothesis.
|
protected static final Random RANDOM
protected abstract T randomInit()
this hypothesis after a random initialization.protected abstract List<T> crossOver(T other)
other - the other hypothesis to cross-over with.protected abstract double calculateFitness()
protected abstract void mutate()
Copyright © 2017. All rights reserved.