|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.architecture.traffic.algorithms.tlc.ACGJ5.Population
protected class ACGJ5.Population
DOCUMENT ME!
| Field Summary | |
|---|---|
protected ACGJ5.Individual[] |
inds
The Individuals in this population |
protected int |
this_gen
a counter for the current generation of Individuals |
protected int |
this_ind
the ID of the current Individual that's showing off it's coolness |
| Constructor Summary | |
|---|---|
protected |
ACGJ5.Population()
Creates a new Population object. |
protected |
ACGJ5.Population(Infrastructure infra)
Creates a new population of Individuals |
| Method Summary | |
|---|---|
protected float |
calcFitness(ACGJ5.Individual ind)
Calculates the fitness of this Individual |
protected void |
evolve()
Evolves the current generation of Individuals in the Population into a new one. |
protected int |
getCurrentGenerationNum()
DOCUMENT ME! |
protected ACGJ5.Individual |
getIndividual()
DOCUMENT ME! |
protected float[] |
getNewGenes(ACGJ5.Individual ma,
ACGJ5.Individual pa)
Returns some reproduction genes from this ACGJ3Individual. |
protected ACGJ5.Individual |
getNextIndividual(int wait,
int move)
DOCUMENT ME! |
java.lang.String |
getXMLName()
DOCUMENT ME! |
void |
load(XMLElement myElement,
XMLLoader loader)
DOCUMENT ME! |
protected ACGJ5.Individual[] |
mate(ACGJ5.Individual ma,
ACGJ5.Individual pa)
Mates two Individuals creating two new Individuals |
void |
saveChilds(XMLSaver saver)
DOCUMENT ME! |
XMLElement |
saveSelf()
DOCUMENT ME! |
void |
setParentName(java.lang.String parentName_)
DOCUMENT ME! |
protected ACGJ5.Individual[] |
sortIndsArr(ACGJ5.Individual[] ar)
BubbleSorts an array of ACGJ3Individuals on the parameter of performance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int this_ind
protected int this_gen
protected ACGJ5.Individual[] inds
| Constructor Detail |
|---|
protected ACGJ5.Population(Infrastructure infra)
infra - The Infrastructure the population will run onprotected ACGJ5.Population()
| Method Detail |
|---|
protected int getCurrentGenerationNum()
protected ACGJ5.Individual getIndividual()
protected ACGJ5.Individual getNextIndividual(int wait,
int move)
wait - The performance of the current Individualmove - DOCUMENT ME!
protected ACGJ5.Individual[] sortIndsArr(ACGJ5.Individual[] ar)
ar - the array to be sorted
protected float calcFitness(ACGJ5.Individual ind)
ind - the individual of which the fitness has to be calculated
protected ACGJ5.Individual[] mate(ACGJ5.Individual ma,
ACGJ5.Individual pa)
ma - The mamma-Individualpa - The pappa-Individual
protected void evolve()
protected float[] getNewGenes(ACGJ5.Individual ma,
ACGJ5.Individual pa)
ma - DOCUMENT ME!pa - DOCUMENT ME!
public void load(XMLElement myElement,
XMLLoader loader)
throws XMLTreeException,
java.io.IOException,
XMLInvalidInputException
load in interface XMLSerializablemyElement - DOCUMENT ME!loader - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
XMLInvalidInputException - DOCUMENT ME!
public XMLElement saveSelf()
throws XMLCannotSaveException
saveSelf in interface XMLSerializableXMLCannotSaveException - DOCUMENT ME!
public void saveChilds(XMLSaver saver)
throws XMLTreeException,
java.io.IOException,
XMLCannotSaveException
saveChilds in interface XMLSerializablesaver - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
java.io.IOException - DOCUMENT ME!
XMLCannotSaveException - DOCUMENT ME!public java.lang.String getXMLName()
getXMLName in interface XMLSerializable
public void setParentName(java.lang.String parentName_)
throws XMLTreeException
setParentName in interface XMLSerializableparentName_ - DOCUMENT ME!
XMLTreeException - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||