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

cherrymoya.h

00001 /***************************************************************************
00002                           cherrymoya.h  -  description
00003                              -------------------
00004     begin                : Sat Jan 19 2002
00005     copyright            : (C) 2002 by Rudiger Koch
00006     email                : rkoch@rkoch.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef CHERRYMOYA_H
00019 #define CHERRYMOYA_H
00020 
00021 using namespace std;
00022 #include <amygdala/genomehandler.h>
00023 #include <amygdala/neuron.h>
00024 
00025 #include <pair.h>
00026 
00031 class Cherrymoya : public GenomeHandler  {
00032 public:
00036     Cherrymoya(unsigned int r);
00037     ~Cherrymoya();
00038 
00039 //  implemented methods from base class
00040     virtual void gene (string gene);
00041     virtual void startChromosome(int geneLength, int genes);
00042     virtual void finish();
00043 
00045     virtual const int& getradius();
00047     Network* getNetwork();
00049     vector <AmIdInt> GetInputNeurons();
00051     vector <Neuron*> GetOutputNeurons();
00052 
00053 private: // Private attributes
00056     float stepSize;
00057 
00059     unsigned int N_chromosome;
00061     unsigned int N_gene;
00063     int radius;
00065     float dendriteRadius;
00066     float offset;
00068     float axonLengthFactor;
00069 
00073     vector < vector < vector <pair <bool, Neuron *> > > > theCherrymoya;
00074 
00075     /*  The pair are < (strength of the singularity) , (reference to an associated skin neuron) >
00076         This reference is needed to get the location */
00077     vector < float* > skinSingularities;
00078     /*  The pair are < (strength of the singularity) , (an reference to an input neuron) >
00079         This reference is needed to get the location */
00080     vector < pair < float, Neuron*> > inputNeurons;
00081     /*  The pair are < (strength of the singularity) , (an reference to an output neuron) >
00082         This reference is needed to get the location */
00083     vector < pair < float, Neuron*> > outputNeurons;
00084 
00085     LayerConstants layerConst;
00086     Layer *hiddenLayer;
00087     Layer *inputLayer;
00088     Layer *outputLayer;
00089 
00090     unsigned int nId;
00091 
00092     enum cherrymoyaPart { SKIN=1, IN, OUT };
00093     Network *net;
00095     unsigned int synapses;
00096 
00097 protected: // Private methods
00098     void BuildCherrymoya();
00100     void connectInputNeurons();
00102     void connectSkin();
00104     void connectMeat();
00106     void getFieldStrengthMeat(float *location, float *E);
00108     void getFieldStrengthSkin(float *location, float *E);
00114     void AxonConnector3D(Neuron *currentNeuron);
00122     void AxonConnectorSkin(Neuron *currentNeuron);
00123 };
00124 
00125 #endif

Generated on Wed Sep 4 02:30:34 2002 for Amygdala by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002