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