| Home | Trees | Index | Help |
|
|---|
| Package pygene :: Module gene :: Class BaseGene |
|
object--+ |PGXmlMixin--+ | BaseGene
BitGene,
CharGene,
ComplexGene,
DiscreteGene,
FloatGene,
IntGeneBase class from which all the gene classes are derived.
You cannot use this class directly, because there are some methods that must be overridden.| Method Summary | |
|---|---|
__init__(self,
value)
| |
Combines two genes in a gene pair, to produce an effect | |
__repr__(self)
| |
Produce an exact copy of this gene | |
maybeMutate(self)
| |
Perform a mutation on the gene | |
Generates a plausible random value for 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 |
mutProb = 0.01 |
NoneType |
value = None |
| Method Details |
|---|
__add__(self,
other)
|
copy(self)Produce an exact copy of this gene Shouldn't need to be overridden |
mutate(self)Perform a mutation on the gene You MUST override this in subclasses |
randomValue(self)Generates a plausible random value for this gene. Must be overridden |
xmlDumpAttribs(self, tag)sets attributes of tag
|
xmlDumpSelf(self, doc, parent)dump out this gene into parent tag
|
| Class Variable Details |
|---|
mutProb
|
value
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Mon Dec 12 14:37:12 2005 | http://epydoc.sf.net |