|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mss.ea.chr.ChromosomeSet
Base class for a chromosome set. A chromosome set contains all chromosomes of an individual and therefor represents the whole genetic information.
Field Summary | |
protected java.util.ArrayList |
set
Vector containing all chromosomes. |
Constructor Summary | |
ChromosomeSet()
Constructor. |
|
ChromosomeSet(Chromosome[] ca)
Constructor with array of chromosomes. |
|
ChromosomeSet(int setLength)
Constructor with specified length of chromosome vector. |
Method Summary | |
void |
add(Chromosome c)
Adds a chromosome to the end of the chromosome vector. |
void |
add(Chromosome[] ca)
Adds an array of chromosome to the chromosome set. |
void |
add(Chromosome[] ca,
int i)
Adds a chromosome from an array with chromosomes to the end of the chromosome vector. |
void |
clear()
Clears all chromosomes. |
void |
clear(int index)
Clears a single chromosome. |
java.lang.Object |
clone()
Clones the chromosome set. |
boolean |
equals(java.lang.Object o)
|
Chromosome |
get(int i)
Gets a chromosome. |
void |
remove(int index)
Removes a single chromosome from the chromosome set, decreasing it's length by 1. |
void |
replace(Chromosome c,
int i)
Replaces a chromosome. |
int |
size()
Gets the number of chromosomes . |
java.lang.String |
toString()
Returns the representation of this chromosome set as a string. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.ArrayList set
Constructor Detail |
public ChromosomeSet()
public ChromosomeSet(int setLength)
setLength
- initial length of internal chromosome vectorpublic ChromosomeSet(Chromosome[] ca)
ca
- array containing chromosomesMethod Detail |
public void add(Chromosome c)
c
- chromosome to be addedpublic void add(Chromosome[] ca, int i)
ca
- array with chromosomesi
- index of chromosome in arraypublic void add(Chromosome[] ca)
ca
- array with chromosomespublic Chromosome get(int i)
i
- index of the chromosomepublic void replace(Chromosome c, int i)
c
- new chromosomei
- index of the chromosome to be replacedpublic void clear()
public void clear(int index)
index
- index of chromosomepublic void remove(int index)
index
- index of chromosome to be removedpublic int size()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |