Packagecom.suckatmath.machinelearning.genetic.impl
Classpublic class FixedLengthStringGene
InheritanceFixedLengthStringGene Inheritance Object
Implements Gene

Gene consisting of a fixed length String



Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Property Detail
alphabetproperty
public var alphabet:String

String to use as a alphabet of valid chars

contentproperty 
public var content:String

contains actual gene info

lengthproperty 
public var length:int

how many chars in the string

Constructor Detail
FixedLengthStringGene()Constructor
public function FixedLengthStringGene(l:int, a:String)

create a new FixedLengthStringGene

Parameters
l:int — int length of Gene
 
a:String — String alphabet
Method Detail
mutate()method
public function mutate():Gene

implementation of Gene.mutate. Creates a new FixedLengthStringGene slightly different from this one

Returns
Gene — FixedLengthStringGene
newRandom()method 
public function newRandom():Gene

build a new random FixedLengthStringGene

Returns
Gene — FixedLengthStringGene as Gene
toString()method 
public function toString():String

return a String representation.

Returns
String