|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojavax.ga.util.GATools
public final class GATools
Utility methods for the GA library
| Constructor Summary | |
|---|---|
GATools()
|
|
| Method Summary | |
|---|---|
static SymbolList |
createBinary(String binarySequence)
Creates a SymbolList in the GABinary Alphabet |
static FiniteAlphabet |
getBinaryAlphabet()
Gets a Reference to the FlyWeight GA_Binary Alphabet. |
static AtomicSymbol |
one()
|
static OrderNDistribution |
standardMutationDistribution(FiniteAlphabet a)
Makes a mutation Distribution where the probability
of a Symbol being mutated to itself is zero and the
probability of it being changed to any other Symbol in
the Alphabet a is 1.0 / (a.size() - 1.0) |
static OrderNDistribution |
uniformMutationDistribution(FiniteAlphabet a)
Makes a 1st order distribution which is infact uniform (equivalent to a uniform zero order distribution). |
static AtomicSymbol |
zero()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GATools()
| Method Detail |
|---|
public static FiniteAlphabet getBinaryAlphabet()
Alphabet.
It contains the Symbols one and zero.
public static AtomicSymbol one()
public static SymbolList createBinary(String binarySequence)
throws IllegalSymbolException
SymbolList in the GABinary Alphabet
binarySequence - a String like "01010000101010101" with no white space
SymbolList parsed from binarySequence
IllegalSymbolException - if a character other than 1 or 0 is found.public static AtomicSymbol zero()
public static OrderNDistribution uniformMutationDistribution(FiniteAlphabet a)
throws IllegalAlphabetException
a - the zero order Alphabet which will be multiplied into the 1st order alphabet
IllegalAlphabetException - if the Distribution cannot be constructed from a.
public static OrderNDistribution standardMutationDistribution(FiniteAlphabet a)
throws IllegalAlphabetException
Distribution where the probability
of a Symbol being mutated to itself is zero and the
probability of it being changed to any other Symbol in
the Alphabet a is 1.0 / (a.size() - 1.0)
a - the FiniteAlphabet which mutations are sampled from.
Distribution suitable for use in a MutationFunction
IllegalAlphabetException - if the Distribution cannot be made
over the FiniteAlphabet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||