|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojavax.ga.functions.CrossOverFunction.NoCross
public static final class CrossOverFunction.NoCross
A place holder CrossOverFunction that doesn't perform cross overs
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.biojavax.ga.functions.CrossOverFunction |
|---|
CrossOverFunction.NoCross |
| Field Summary |
|---|
| Fields inherited from interface org.biojavax.ga.functions.CrossOverFunction |
|---|
CROSS_PROB, DEFAULT_CROSS_PROB, DEFAULT_MAX_CROSS, MAX_CROSSES, NO_CROSS |
| Constructor Summary | |
|---|---|
CrossOverFunction.NoCross()
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener cl)
Add a listener that will be informed of all changes. |
void |
addChangeListener(ChangeListener cl,
ChangeType ct)
Add a listener that will be informed of changes of a given type. |
double[] |
getCrossOverProbs()
|
int |
getMaxCrossOvers()
|
boolean |
isUnchanging(ChangeType t)
A particular ChangeType can never be raised by this Changeable. |
GACrossResult |
performCrossOver(SymbolList chromA,
SymbolList chromB)
Performs a cross between the pair of chromosomes |
void |
removeChangeListener(ChangeListener c)
Remove a listener that was interested in all types of changes. |
void |
removeChangeListener(ChangeListener cl,
ChangeType ct)
Remove a listener that was interested in a specific types of changes. |
void |
setCrossOverProbs(double[] crossOverProb)
Sets the probability of crossing at each base. |
void |
setMaxCrossOvers(int max)
Sets an upper limit on the number of crosses. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CrossOverFunction.NoCross()
| Method Detail |
|---|
public double[] getCrossOverProbs()
getCrossOverProbs in interface CrossOverFunctionpublic int getMaxCrossOvers()
getMaxCrossOvers in interface CrossOverFunction
public GACrossResult performCrossOver(SymbolList chromA,
SymbolList chromB)
CrossOverFunction
performCrossOver in interface CrossOverFunctionchromA - The first chromosome in the crosschromB - The second chromosome in the cross
GACross that holds the results of the cross
public void setCrossOverProbs(double[] crossOverProb)
throws ChangeVetoException
CrossOverFunctionSymbolList
is given by crossOverProbs[1]. CrossOverProbs[0] is effectively
redundant as the cross would occur before the 1st position in the SymbolList.
By convention if the array is shorter than the SymbolList it is being applied
to then the last value in the array will be applied to every subsequent residue.
The default value in all implementations should be DEFAULT_CROSS_PROB
setCrossOverProbs in interface CrossOverFunctioncrossOverProb - an array of doubles giving the probability of a
cross occuring at any place.
ChangeVetoException
public void setMaxCrossOvers(int max)
throws ChangeVetoException
CrossOverFunction
setMaxCrossOvers in interface CrossOverFunctionmax - the limit on crosses
ChangeVetoException - if a ChangeListener vetoes this changepublic boolean isUnchanging(ChangeType t)
ChangeableA particular ChangeType can never be raised by this Changeable.
If this returns true, then it is guaranteed that change events of this type (and all child types) can never under any circumstances be fired by this Changeable instance. If it returns false, that does not mean that this type of event will or even can be raised, but that it is worth registering listeners incase.
isUnchanging in interface Changeablet - the ChangeType to check
public void removeChangeListener(ChangeListener c)
Changeable
removeChangeListener in interface Changeablec - a ChangeListener to removepublic void addChangeListener(ChangeListener cl)
Changeable
addChangeListener in interface Changeablecl - the ChangeListener to add
public void addChangeListener(ChangeListener cl,
ChangeType ct)
Changeable
addChangeListener in interface Changeablecl - the ChangeListenerct - the ChangeType it is to be informed of
public void removeChangeListener(ChangeListener cl,
ChangeType ct)
Changeable
removeChangeListener in interface Changeablecl - a ChangeListener to removect - the ChangeType that it was interested in
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||