|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opt4j.core.Individual
public class Individual
The Individual class forms a single solution for the given
optimization problem.
An Individual contains the Genotype, phenotype Object
, and Objectives: Initially, the Individual contains only a
Genotype. The Decoder decodes the
Genotype into a phenotype and adds it to the Individual.
Finally, the phenotype is evaluated and the resulting Objectives are
added to the Individual.
Genotype,
Objectives| Nested Class Summary | |
|---|---|
static class |
Individual.State
The possible states of an Individual. |
| Field Summary | |
|---|---|
protected Genotype |
genotype
|
protected java.util.Set<IndividualStateListener> |
individualStateListeners
|
protected Objectives |
objectives
|
protected java.lang.Object |
phenotype
|
protected Individual.State |
state
|
| Constructor Summary | |
|---|---|
protected |
Individual()
Constructs an Individual. |
| Method Summary | |
|---|---|
Genotype |
getGenotype()
Returns the genotype. |
Objectives |
getObjectives()
Returns the objectives. |
java.lang.Object |
getPhenotype()
Returns the phenotype. |
Individual.State |
getState()
Returns the Individual.State of the Individual. |
boolean |
isDecoded()
Indicates whether this Individual is already decoded. |
boolean |
isEvaluated()
Indicates whether this Individual is already evaluated. |
void |
setGenotype(Genotype genotype)
Sets the genotype. |
protected void |
setIndividualStatusListeners(java.util.Set<IndividualStateListener> individualStateListeners)
Sets the list of IndividualStateListeners that are called if the
Individual.State of this individual changes. |
void |
setObjectives(Objectives objectives)
Sets the objectives. |
void |
setPhenotype(java.lang.Object phenotype)
Sets the phenotype. |
void |
setState(Individual.State state)
Sets the state of the Individual. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Genotype genotype
protected java.lang.Object phenotype
protected Objectives objectives
protected java.util.Set<IndividualStateListener> individualStateListeners
protected Individual.State state
| Constructor Detail |
|---|
@Inject protected Individual()
Individual.
| Method Detail |
|---|
public java.lang.Object getPhenotype()
setPhenotype(java.lang.Object)public Objectives getObjectives()
setObjectives(org.opt4j.core.Objectives)public Genotype getGenotype()
setGenotype(org.opt4j.core.Genotype)public void setGenotype(Genotype genotype)
genotype - the genotype to be setgetGenotype()public void setPhenotype(java.lang.Object phenotype)
phenotype - the phenotype to be setgetPhenotype()public void setObjectives(Objectives objectives)
objectives - the objectives to be setgetObjectives()public boolean isDecoded()
Individual is already decoded.
true if this individual is decodedpublic boolean isEvaluated()
Individual is already evaluated.
true if this inividual is evaluatedpublic void setState(Individual.State state)
Individual.
state - the new statusgetState()public Individual.State getState()
Individual.State of the Individual.
setState(org.opt4j.core.Individual.State)protected void setIndividualStatusListeners(java.util.Set<IndividualStateListener> individualStateListeners)
IndividualStateListeners that are called if the
Individual.State of this individual changes.
individualStateListeners - the listener for a changing status.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||