Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Gene Class Reference

The abstract concept of a genetic structure encoding some specific phenotypic feature; the atomic unit of a Genstruct. More...

#include <genes.h>

Inheritance diagram for Gene:

Genstruct AnyFloatGene AnyIntGene BinaryGene InterGene BitFloatGene FloatGene BitIntGene IntGene List of all members.

Public Methods

 Gene ()
void setMutability (double val)
double getMutability () const
virtual void addPrivateGenes (Gentainer &g, const StringMap &params)
virtual void copy (const Genstruct &other)
virtual const GenstructgetGene (const GeneticID &nam) const
virtual void check () const

Protected Methods

virtual int calc_len () const

Protected Attributes

double mutability

Detailed Description

The abstract concept of a genetic structure encoding some specific phenotypic feature; the atomic unit of a Genstruct.

Actually it's not so atomic at physical level, since it can contain even lower level structures, but in logical level it should be atomic.

The class should be abstract, but is not because Array doesn't allow that.

Definition at line 54 of file genes.h.


Constructor & Destructor Documentation

Gene   [inline]
 

Default constructor, FORBIDDEN! Exists only because of RTTI system.

Definition at line 60 of file genes.h.


Member Function Documentation

virtual void addPrivateGenes Gentainer   g,
const StringMap &    params
[inline, virtual]
 

Implementation for Genstruct.

Reimplemented from Genstruct.

Definition at line 73 of file genes.h.

virtual int calc_len   const [inline, protected, virtual]
 

Actually calculates the true length of the genome (recursively).

Reimplemented from Genstruct.

Reimplemented in BitFloatGene, and BitIntGene.

Definition at line 91 of file genes.h.

virtual void check   [inline, virtual]
 

Implementation for Object.

Reimplemented from Genstruct.

Reimplemented in AnyFloatGene, FloatGene, BitFloatGene, AnyIntGene, IntGene, and BitIntGene.

Definition at line 82 of file genes.h.

References Genstruct::check().

Referenced by AnyIntGene::check(), and AnyFloatGene::check().

void copy const Genstruct   other [virtual]
 

Implementation for Genstruct.

Reimplemented from Genstruct.

Reimplemented in BinaryGene, AnyFloatGene, FloatGene, BitFloatGene, AnyIntGene, IntGene, BitIntGene, and InterGene.

Definition at line 70 of file genes.cc.

References Genstruct::copyGenstr(), and mutability.

Referenced by AnyIntGene::copy(), AnyFloatGene::copy(), and BinaryGene::copy().

virtual const Genstruct* getGene const GeneticID &    nam const [inline, virtual]
 

Implementation for Genstruct.

Reimplemented from Genstruct.

Definition at line 79 of file genes.h.

References Genstruct::id.

double getMutability   const [inline]
 

Returns the mutation coefficient.

Definition at line 68 of file genes.h.

References mutability.

void setMutability double    val [inline]
 

Sets the mutation coefficient.

Definition at line 65 of file genes.h.

References mutability.


Member Data Documentation

double mutability [protected]
 

A coefficient for the mutation propability OR distribution function.

Its semantics are dependent on the specific gene subclass.

Definition at line 89 of file genes.h.

Referenced by copy(), getMutability(), BinaryGene::operator>>(), IntGene::pointMutate(), FloatGene::pointMutate(), BinaryGene::pointMutate(), and setMutability().


The documentation for this class was generated from the following files:
Generated on Thu Feb 10 20:12:01 2005 for NeHeP by doxygen1.2.18