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

Type AsciiCharGene

object --+            
         |            
PGXmlMixin --+        
             |        
      BaseGene --+    
                 |    
          CharGene --+
                     |
                    AsciiCharGene

Known Subclasses:
PrintableCharGene

Specialisation of CharGene that can only hold chars in the legal ASCII range
Method Summary
  __repr__(self)
still need to str() the value, since the range includes control chars
    Inherited from CharGene
  __add__(self, other)
produces the phenotype resulting from combining this gene with another gene in the pair
  mutate(self)
perform gene mutation
  randomValue(self)
return a legal random value for this gene which is in the range [self.randMin, self.randMax]
    Inherited from BaseGene
  __init__(self, value)
  copy(self)
Produce an exact copy of this gene
  maybeMutate(self)
  xmlDumpAttribs(self, tag)
sets attributes of tag
  xmlDumpSelf(self, doc, parent)
dump out this gene into parent tag
    Inherited from PGXmlMixin
  xmlDump(self, fileobj)
Dumps out the population to an open file in XML format.
  xmlDumpClass(self, tag)
dumps out class information
  xmlDumps(self)
dumps out to xml, returning a string of the raw generated xml
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
str randMax = '\xff'
str randMin = '\x00'
    Inherited from BaseGene
float mutProb = 0.01                                                                  
NoneType value = None                                                                  

Method Details

__repr__(self)
(Representation operator)

still need to str() the value, since the range includes control chars
Overrides:
pygene.gene.CharGene.__repr__

Class Variable Details

randMax

Type:
str
Value:
'\xff'                                                                 

randMin

Type:
str
Value:
'\x00'                                                                 

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