P
- the problem typeR
- the representation typepublic class EpigeneticCell<P extends Problem<R>,R extends Representation<?>> extends java.lang.Object implements java.lang.Comparable<EpigeneticCell<P,R>>
Constructor and Description |
---|
EpigeneticCell(P problem)
Constructor
|
EpigeneticCell(P problem,
R representation,
java.util.BitSet n)
Constructor.
|
EpigeneticCell(P problem,
R representation,
java.util.BitSet n,
double fitness)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(EpigeneticCell<P,R> o) |
void |
crossover(EpigeneticCell<P,R> other)
Cells's crossover.
|
EpigeneticCell<P,R> |
duplicate()
Duplicates the Cell.
|
boolean |
equals(java.lang.Object obj) |
void |
generateNucleosomes(float pn,
int radius)
Generates a new configuration of the nucleosomes
|
double |
getFitness()
Returns the cell's fitness
|
java.util.BitSet |
getNucleosomes() |
P |
getProblem() |
R |
getRepresentation() |
int |
hashCode() |
boolean |
isBetter(EpigeneticCell<P,R> other)
Returns true if the cell is better than the other.
|
void |
methilate(float eprobability)
Cells's methilation.
|
java.lang.String |
toString() |
void |
update(EpigeneticCell<P,R> other)
Updates the contents of the cell with the other passed as parameter.
|
public EpigeneticCell(P problem)
problem
- the problempublic EpigeneticCell(P problem, R representation, java.util.BitSet n)
problem
- representation
- n
- public EpigeneticCell(P problem, R representation, java.util.BitSet n, double fitness)
problem
- the problemrepresentation
- the representationn
- the nuclesomesfitness
- the fitnesspublic EpigeneticCell<P,R> duplicate()
public boolean isBetter(EpigeneticCell<P,R> other)
other
- the other cell.public double getFitness()
public int compareTo(EpigeneticCell<P,R> o)
compareTo
in interface java.lang.Comparable<EpigeneticCell<P extends Problem<R>,R extends Representation<?>>>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public P getProblem()
public R getRepresentation()
public java.util.BitSet getNucleosomes()
public java.lang.String toString()
toString
in class java.lang.Object
public void generateNucleosomes(float pn, int radius)
pn
- the nucleosome probabilityradius
- the maximum radiuspublic void crossover(EpigeneticCell<P,R> other)
other
- the other Cellpublic void methilate(float eprobability)
eprobability
- the epigenetic probabilitypublic void update(EpigeneticCell<P,R> other)
other
- the other cell.