Package pygene :: Module gene
[show private | hide private]
[frames | no frames]

Module pygene.gene

Implements a collection of gene classes

Genes support the following python operators: These genes work via classical Mendelian genetics
Classes
AndBitGene Implements a single-bit gene, whose phenotype is the AND of each gene in the pair
AsciiCharGene Specialisation of CharGene that can only hold chars in the legal ASCII range
BaseGene Base class from which all the gene classes are derived.
BitGene Implements a single-bit gene
CharGene Gene that holds a single ASCII character, as a 1-byte string
ComplexGene A gene whose value is a complex point number
DiscreteGene Gene type with a fixed set of possible values, typically strings
FloatGene A gene whose value is a floating point number
FloatGeneMax phenotype of this gene is the greater of the values in the gene pair
FloatGeneRandom Variant of FloatGene where mutation always randomises the value
IntGene Implements a gene whose values are ints, constrained within the randMin,randMax range
OrBitGene Implements a single-bit gene, whose phenotype is the OR of each gene in the pair
PrintableCharGene Specialisation of AsciiCharGene that can only hold printable chars
XorBitGene Implements a single-bit gene, whose phenotype is the exclusive-or of each gene in the pair

Function Summary
  AsciiCharGeneFactory(name, **kw)
Returns a new class object, being a subclass of AsciiCharGene, with class attributes set from keywords
  CharGeneFactory(name, **kw)
Returns a new class object, being a subclass of CharGene, with class attributes set from keywords
  DiscreteGeneFactory(name, **kw)
Returns a new class object, being a subclass of DiscreteGene, with class attributes set from keywords
  FloatGeneFactory(name, **kw)
Returns a new class object, being a subclass of FloatGene, with class attributes set from keywords
  IntGeneFactory(name, **kw)
Returns a new class object, being a subclass of IntGene, with class attributes set from keywords
  PrintableCharGeneFactory(name, **kw)
Returns a new class object, being a subclass of PrintableGene, with class attributes set from keywords
  rndPair(geneclass)
Returns a gene pair, comprising two random instances of the given gene class

Function Details

AsciiCharGeneFactory(name, **kw)

Returns a new class object, being a subclass of AsciiCharGene, with class attributes set from keywords

CharGeneFactory(name, **kw)

Returns a new class object, being a subclass of CharGene, with class attributes set from keywords

DiscreteGeneFactory(name, **kw)

Returns a new class object, being a subclass of DiscreteGene, with class attributes set from keywords

FloatGeneFactory(name, **kw)

Returns a new class object, being a subclass of FloatGene, with class attributes set from keywords

IntGeneFactory(name, **kw)

Returns a new class object, being a subclass of IntGene, with class attributes set from keywords

PrintableCharGeneFactory(name, **kw)

Returns a new class object, being a subclass of PrintableGene, with class attributes set from keywords

rndPair(geneclass)

Returns a gene pair, comprising two random instances of the given gene class

Generated by Epydoc 2.1 on Mon Dec 12 14:37:12 2005 http://epydoc.sf.net