| Package | com.suckatmath.machinelearning.genetic.impl |
| Class | public class FixedLengthStringGene |
| Inheritance | FixedLengthStringGene Object |
| Implements | Gene |
| Property | Defined By | ||
|---|---|---|---|
| alphabet : String
String to use as a alphabet of valid chars
| FixedLengthStringGene | ||
| content : String
contains actual gene info
| FixedLengthStringGene | ||
| length : int
how many chars in the string
| FixedLengthStringGene | ||
| Method | Defined By | ||
|---|---|---|---|
FixedLengthStringGene(l:int, a:String)
create a new FixedLengthStringGene
| FixedLengthStringGene | ||
implementation of Gene.mutate. | FixedLengthStringGene | ||
build a new random FixedLengthStringGene
| FixedLengthStringGene | ||
toString():String
return a String representation. | FixedLengthStringGene | ||
| alphabet | property |
public var alphabet:StringString to use as a alphabet of valid chars
| content | property |
public var content:Stringcontains actual gene info
| length | property |
public var length:inthow many chars in the string
| FixedLengthStringGene | () | Constructor |
public function FixedLengthStringGene(l:int, a:String)create a new FixedLengthStringGene
Parametersl:int — int length of Gene
| |
a:String — String alphabet
|
| mutate | () | method |
public function mutate():Geneimplementation of Gene.mutate. Creates a new FixedLengthStringGene slightly different from this one
ReturnsGene — FixedLengthStringGene
|
| newRandom | () | method |
public function newRandom():Genebuild a new random FixedLengthStringGene
ReturnsGene — FixedLengthStringGene as Gene
|
| toString | () | method |
public function toString():Stringreturn a String representation.
ReturnsString —
|