public class OnemaxProblem extends AbstractOnemaxProblem<BinaryRepresentation>
| Constructor and Description |
|---|
OnemaxProblem(int size)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
crossover(BinaryRepresentation r1,
BinaryRepresentation r2,
java.util.BitSet n)
Epigenetic crossover of two solutions.
|
BinaryRepresentation |
generateSolution()
Generate a new solution of the Problem.
|
void |
methilate(BinaryRepresentation r,
java.util.BitSet n,
float eprobability)
Epigenetic methilation of a solution.
|
void |
save(BinaryRepresentation representation,
java.lang.String file)
Saves the problem representation to a file.
|
compare, toStringgetEvaluations, getFitness, getSize, isBetterpublic OnemaxProblem(int size)
size - the problem sizepublic void crossover(BinaryRepresentation r1, BinaryRepresentation r2, java.util.BitSet n)
Problemcrossover in class Problem<BinaryRepresentation>r1 - the representation of the first solutionr2 - the representation of the second solutionn - the nucleosome vectorpublic void methilate(BinaryRepresentation r, java.util.BitSet n, float eprobability)
Problemmethilate in class Problem<BinaryRepresentation>r - the representation of the solutionn - the nucleosome vectoreprobability - the epigenetic probabilitypublic BinaryRepresentation generateSolution()
ProblemgenerateSolution in class Problem<BinaryRepresentation>public void save(BinaryRepresentation representation, java.lang.String file) throws java.io.FileNotFoundException
Problemsave in class Problem<BinaryRepresentation>representation - the representationfile - the filenamejava.io.FileNotFoundException - If the file cannot be saved