public class Chromosome extends java.lang.Object implements java.lang.Comparable<Chromosome>
Modifier and Type | Field and Description |
---|---|
boolean |
altered |
java.lang.Double |
fitness |
short[] |
GeneRotation |
short[] |
GeneXPadding |
int[] |
GeneXPos |
short[] |
GeneYPadding |
int[] |
GeneYPos |
int[] |
Index2GenePositionInChromosome |
Constructor and Description |
---|
Chromosome() |
Chromosome(int nbrOfGenes) |
Modifier and Type | Method and Description |
---|---|
Chromosome |
clone() |
int |
compareTo(Chromosome o) |
double |
getPortXOffset(PlacementFrame.PlacementPort port,
int geneIndex)
Calculate port location with applied rotation angle of this gene.
|
double |
getPortYOffset(PlacementFrame.PlacementPort port,
int geneIndex)
Calculate port location with applied rotation angle of this gene.
|
boolean |
isIndex2GenePosValid()
Use to assert that each index is represented exactly once in the
index2gene map.
|
void |
rotate(int angle,
int geneIndex)
Rotate by given angle in 10th degree.
|
int |
size() |
public boolean altered
public java.lang.Double fitness
public int[] Index2GenePositionInChromosome
public int[] GeneXPos
public int[] GeneYPos
public short[] GeneRotation
public short[] GeneYPadding
public short[] GeneXPadding
public void rotate(int angle, int geneIndex)
angle
- the angle of rotation (in tenth-degrees)public int size()
public int compareTo(Chromosome o)
compareTo
in interface java.lang.Comparable<Chromosome>
public Chromosome clone()
clone
in class java.lang.Object
public double getPortXOffset(PlacementFrame.PlacementPort port, int geneIndex)
port
- Port of which location is to be computed.public double getPortYOffset(PlacementFrame.PlacementPort port, int geneIndex)
port
- Port of which location is to be computed.public boolean isIndex2GenePosValid()