Home | Trees | Index | Help |
|
---|
Package pygene :: Module gene :: Class FloatGene |
|
object
--+ |PGXmlMixin
--+ |BaseGene
--+ | FloatGene
FloatGeneMax
,
FloatGeneRandom
A gene whose value is a floating point number
Class variables to override:Method Summary | |
---|---|
Combines two genes in a gene pair, to produce an effect | |
Mutate this gene's value by a random amount within the range, which is determined by multiplying self.mutAmt by the distance of the gene's current value from either endpoint of legal values | |
Generates a plausible random value for this gene. | |
Inherited from BaseGene | |
| |
| |
Produce an exact copy of this gene | |
| |
sets attributes of tag | |
dump out this gene into parent tag | |
Inherited from PGXmlMixin | |
Dumps out the population to an open file in XML format. | |
dumps out class information | |
dumps out to xml, returning a string of the raw generated xml | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
float |
mutAmt = 0.10000000000000001 |
float |
randMax = 1.0 |
float |
randMin = -1.0 |
Inherited from BaseGene | |
float |
mutProb = 0.01 |
NoneType |
value = None |
Method Details |
---|
__add__(self,
other)
|
mutate(self)Mutate this gene's value by a random amount within the range, which is determined by multiplying self.mutAmt by the distance of the gene's current value from either endpoint of legal values perform mutation IN-PLACE, ie don't return mutated copy
|
randomValue(self)Generates a plausible random value for this gene. Override as needed
|
Class Variable Details |
---|
mutAmt
|
randMax
|
randMin
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Dec 12 14:37:12 2005 | http://epydoc.sf.net |