|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.multiprocess.Job
adams.genetic.MTAbstractGeneticAlgorithm.GeneticAlgorithmJob
public abstract static class MTAbstractGeneticAlgorithm.GeneticAlgorithmJob
A job class specific to genetic algorithms.
| Field Summary | |
|---|---|
protected int |
m_chrom_num
the number of chromosomes. |
protected Double |
m_fitness
the current fitness. |
protected MTAbstractGeneticAlgorithm |
m_genetic
the algorithm object this job belongs to. |
protected int[] |
m_weights
the weights of the chromosomes (0 = turned off, 1 = turned on). |
| Fields inherited from class adams.multiprocess.Job |
|---|
m_complete, m_completed, m_depends, m_ExecutionError, m_jobInfo, m_jobParams |
| Constructor Summary | |
|---|---|
MTAbstractGeneticAlgorithm.GeneticAlgorithmJob(MTAbstractGeneticAlgorithm g,
int num,
int[] w)
Initializes the job. |
|
| Method Summary | |
|---|---|
abstract void |
calcNewFitness()
Calculates the new fitness. |
void |
cleanUp()
Cleans up data structures, frees up memory. |
Double |
getFitness()
Returns the fitness. |
MTAbstractGeneticAlgorithm |
getGenetic()
Returns the algorithm this job belongs to. |
int |
getNumChrom()
Returns the number of chromosomes. |
int[] |
getWeights()
Returns the current weights of the attributes. |
protected String |
postProcessCheck()
Checks whether all post-conditions have been met. |
protected String |
preProcessCheck()
Checks whether all pre-conditions have been met. |
protected void |
process()
Does the actual execution of the job. |
String |
toString()
Returns a string representation of the job. |
String |
weightsToString()
Turns the weights into a string representation. |
| Methods inherited from class adams.multiprocess.Job |
|---|
addDependency, addParam, execute, getAdditionalErrorInformation, getAsVector, getDependencies, getExecutionError, getJobCompleteListener, getJobInfo, getParam, hasExecutionError, isComplete, jobCompleted, setJobCompleteListener |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut, sizeOf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int[] m_weights
protected MTAbstractGeneticAlgorithm m_genetic
protected Double m_fitness
protected int m_chrom_num
| Constructor Detail |
|---|
public MTAbstractGeneticAlgorithm.GeneticAlgorithmJob(MTAbstractGeneticAlgorithm g,
int num,
int[] w)
g - the algorithm object this job belongs tonum - the number of chromsomesw - the initial weights| Method Detail |
|---|
public MTAbstractGeneticAlgorithm getGenetic()
public int[] getWeights()
public int getNumChrom()
public Double getFitness()
public String weightsToString()
public abstract void calcNewFitness()
protected String preProcessCheck()
preProcessCheck in class Jobprotected void process()
process in class Jobprotected String postProcessCheck()
postProcessCheck in class Jobpublic void cleanUp()
cleanUp in interface CleanUpHandlercleanUp in class Jobpublic String toString()
toString in class Job
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||