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

Reactor Class Template Reference

#include <reactor.h>

Inheritance diagram for Reactor::

CrossReactor MinorReactor NoMutReactor ProtReactor PseudoReactor ReacFactory RelReactor StartReactor StepReactor StructLifeReactor ThresholdReactor List of all members.

Public Methods

 Reactor (char *recNr)
virtual ~Reactor ()
virtual int step ()
virtual int setup ()
int checkFitness ()
list<Seq*>& getSequenceList ()
int getCurrentCapacity ()
Seq* gettmpSequence ()
char* getInFileName ()
int setCurrentCapacity (int nCap)
int setBonus (int bonus)

Public Attributes

bool found_target
bool bInnovation
double d_currentLogTime
double d_currentDumpTime
int n_currentDumpRepl
double d_currentStopTime
char* pTarget
Seq* tmpSequence

Protected Methods

virtual int initalize ()
virtual int readTarget ()
virtual int readInitalPopulation ()
virtual int writeSequences ()
virtual int fillPhenoProductionTable ()
virtual int fillPhenoDiedOutTable ()
virtual int fillSeqLineageTable (int nSeqNr, int nInstance, int nParentSeqNr, int nParentInst)
virtual int replication (double d_random)
virtual int outflow (double d_random)
virtual int insertSequence (char *pSequence, Seq *pParent, int nInstanceOfParentSeq, int nDistToParent)
virtual int mutation (char *&sequence)
virtual int calcSeqFitness ()
virtual int writeMonitor ()
virtual int writeMonitorHeader ()
int writeDump ()

Protected Attributes

char* reactNr
char c_monitorFilename [200]
char c_lineageFilename [200]
char c_historyFilename [200]
char c_inFilename [200]
double d_currentTime
int n_current_capacity
double d_sumChannel
long n_replications
long n_sequenceInnovations
double d_currentReactivity
double d_outflow
int n_capacity
int n_dump
PointMut mutate
RandomWell rwell
hash_set<const Seq*, hash<
const Seq*>, eqSeq<const Seq*> > 
seqSet
hash_set<const Seq*, hash<
const Seq*>, eqSeq<const Seq*>
>::iterator 
seqIter
list<Seq*> list_Sequence
list<Seq*>::iterator listIter

Friends

ostream& operator<< (ostream &stream, Reactor< Seq2 > &flowreactor)

Detailed Description

template<class Seq> class Reactor

The reactor maintains the replication, mutation and outflow of sequences. It is resposible for time advancement and monitor and dumpfile writings. The reactor class is also the base class for all kinds of flow reactors. It performs a genetic algorithm developed by Daniel Gillespie. Since it is a template class, it works with all kinds of sequences <Seq> if the support the following functions: getUnpackedSequence() getPackedSequence addinstance(); removeinstance(nPos) calculate_fitness(char *pTarget);

Definition at line 35 of file reactor.h.


Constructor & Destructor Documentation

template<class Seq>
Reactor<Seq>::Reactor<Seq> ( char * recNr )
 

template<class Seq>
virtual Reactor<Seq>::~Reactor<Seq> ( ) [virtual]
 


Member Function Documentation

template<class Seq>
virtual int Reactor<Seq>::calcSeqFitness ( ) [protected, virtual]
 

Reimplemented in BiFitReactor.

template<class Seq>
int Reactor<Seq>::checkFitness ( )
 

template<class Seq>
int Reactor<Seq>::fillPhenoDiedOutTable ( ) [inline, protected, virtual]
 

Definition at line 61 of file reactor.h.

00061 {return(1);};

template<class Seq>
int Reactor<Seq>::fillPhenoProductionTable ( ) [inline, protected, virtual]
 

Definition at line 60 of file reactor.h.

00060 {return(1);};

template<class Seq>
virtual int Reactor<Seq>::fillSeqLineageTable ( int nSeqNr,
int nInstance,
int nParentSeqNr,
int nParentInst ) [protected, virtual]
 

template<class Seq>
int Reactor<Seq>::getCurrentCapacity ( ) [inline]
 

Definition at line 106 of file reactor.h.

00106 {return (n_current_capacity);}

template<class Seq>
char * Reactor<Seq>::getInFileName ( ) [inline]
 

Definition at line 108 of file reactor.h.

00108 {return (c_inFilename);}

template<class Seq>
list< Seq *> & Reactor<Seq>::getSequenceList<Seq*> ( ) [inline]
 

Definition at line 105 of file reactor.h.

00105 {return(list_Sequence);}

template<class Seq>
Seq * Reactor<Seq>::gettmpSequence ( ) [inline]
 

Definition at line 107 of file reactor.h.

00107 {return tmpSequence;}

template<class Seq>
virtual int Reactor<Seq>::initalize ( ) [protected, virtual]
 

template<class Seq>
virtual int Reactor<Seq>::insertSequence ( char * pSequence,
Seq * pParent,
int nInstanceOfParentSeq,
int nDistToParent ) [protected, virtual]
 

Reimplemented in ProtReactor, RelReactor, StructLifeReactor, and ProtReactor.

template<class Seq>
int Reactor<Seq>::mutation ( char *& sequence ) [inline, protected, virtual]
 

Reimplemented in InsDelReactor, JumpReactor, and NoMutReactor.

Definition at line 67 of file reactor.h.

00067 {return(mutate(sequence));}

template<class Seq>
virtual int Reactor<Seq>::outflow ( double d_random ) [protected, virtual]
 

Reimplemented in ProtReactor, RelReactor, and ProtReactor.

template<class Seq>
virtual int Reactor<Seq>::readInitalPopulation ( ) [protected, virtual]
 

Reimplemented in ProtReactor, StartReactor, StepReactor, and ProtReactor.

template<class Seq>
virtual int Reactor<Seq>::readTarget ( ) [protected, virtual]
 

Reimplemented in BiFitReactor.

template<class Seq>
virtual int Reactor<Seq>::replication ( double d_random ) [protected, virtual]
 

Reimplemented in CrossReactor, MinorReactor, and ReacFactory.

template<class Seq>
int Reactor<Seq>::setBonus ( int bonus )
 

template<class Seq>
int Reactor<Seq>::setCurrentCapacity ( int nCap )
 

template<class Seq>
virtual int Reactor<Seq>::setup ( ) [virtual]
 

Reimplemented in ProtReactor, PseudoReactor, StructLifeReactor, and ProtReactor.

template<class Seq>
virtual int Reactor<Seq>::step ( ) [virtual]
 

Reimplemented in BatchReactor, ReacFactory, NoMutReactor, PopReactor, RelReactor, StartReactor, StepReactor, and StructLifeReactor.

template<class Seq>
int Reactor<Seq>::writeDump ( ) [protected]
 

template<class Seq>
virtual int Reactor<Seq>::writeMonitor ( ) [protected, virtual]
 

Reimplemented in MinorReactor, and ThresholdReactor.

template<class Seq>
virtual int Reactor<Seq>::writeMonitorHeader ( ) [protected, virtual]
 

template<class Seq>
virtual int Reactor<Seq>::writeSequences ( ) [protected, virtual]
 

Reimplemented in ProtReactor, RelReactor, and ProtReactor.


Friends And Related Function Documentation

template<class Seq>
ostream& operator<< ( ostream & stream,
Reactor< Seq2 > & flowreactor ) [friend]
 


Member Data Documentation

template<class Seq>
bool Reactor<Seq>::bInnovation
 

Definition at line 89 of file reactor.h.

template<class Seq>
char Reactor<Seq>::c_historyFilename[200] [protected]
 

Definition at line 41 of file reactor.h.

template<class Seq>
char Reactor<Seq>::c_inFilename[200] [protected]
 

Definition at line 42 of file reactor.h.

template<class Seq>
char Reactor<Seq>::c_lineageFilename[200] [protected]
 

Definition at line 40 of file reactor.h.

template<class Seq>
char Reactor<Seq>::c_monitorFilename[200] [protected]
 

Definition at line 39 of file reactor.h.

template<class Seq>
double Reactor<Seq>::d_currentDumpTime
 

Definition at line 91 of file reactor.h.

template<class Seq>
double Reactor<Seq>::d_currentLogTime
 

Definition at line 90 of file reactor.h.

template<class Seq>
double Reactor<Seq>::d_currentReactivity [protected]
 

Definition at line 48 of file reactor.h.

template<class Seq>
double Reactor<Seq>::d_currentStopTime
 

Definition at line 93 of file reactor.h.

template<class Seq>
double Reactor<Seq>::d_currentTime [protected]
 

Definition at line 43 of file reactor.h.

template<class Seq>
double Reactor<Seq>::d_outflow [protected]
 

Definition at line 49 of file reactor.h.

template<class Seq>
double Reactor<Seq>::d_sumChannel [protected]
 

Definition at line 45 of file reactor.h.

template<class Seq>
bool Reactor<Seq>::found_target
 

Definition at line 88 of file reactor.h.

template<class Seq>
list<Seq*>::iterator Reactor<Seq>::listIter [protected]
 

Definition at line 79 of file reactor.h.

template<class Seq>
list<Seq*> Reactor<Seq>::list_Sequence [protected]
 

Definition at line 78 of file reactor.h.

template<class Seq>
PointMut Reactor<Seq>::mutate [protected]
 

Reimplemented in InsDelReactor, and JumpReactor.

Definition at line 53 of file reactor.h.

Referenced by mutation(), and InsDelReactor::mutation().

template<class Seq>
int Reactor<Seq>::n_capacity [protected]
 

Definition at line 50 of file reactor.h.

template<class Seq>
int Reactor<Seq>::n_currentDumpRepl
 

Definition at line 92 of file reactor.h.

template<class Seq>
int Reactor<Seq>::n_current_capacity [protected]
 

Definition at line 44 of file reactor.h.

template<class Seq>
int Reactor<Seq>::n_dump [protected]
 

Definition at line 51 of file reactor.h.

template<class Seq>
long Reactor<Seq>::n_replications [protected]
 

Definition at line 46 of file reactor.h.

template<class Seq>
long Reactor<Seq>::n_sequenceInnovations [protected]
 

Definition at line 47 of file reactor.h.

template<class Seq>
char* Reactor<Seq>::pTarget
 

Definition at line 95 of file reactor.h.

template<class Seq>
char* Reactor<Seq>::reactNr [protected]
 

Definition at line 38 of file reactor.h.

template<class Seq>
RandomWell Reactor<Seq>::rwell [protected]
 

Definition at line 54 of file reactor.h.

template<class Seq>
hash_set<const Seq*, hash<const Seq*>, eqSeq<const Seq*> >::iterator Reactor<Seq>::seqIter [protected]
 

Definition at line 76 of file reactor.h.

template<class Seq>
hash_set<const Seq*, hash<const Seq*>, eqSeq<const Seq*> > Reactor<Seq>::seqSet [protected]
 

Definition at line 75 of file reactor.h.

template<class Seq>
Seq* Reactor<Seq>::tmpSequence
 

Definition at line 96 of file reactor.h.


The documentation for this class was generated from the following file:
Generated at Wed May 9 14:01:09 2001 for FlowReact by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001