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

cangelosinet.h

Go to the documentation of this file.
00001 
00002 #ifndef __CANGELOSINET_H__
00003 #define __CANGELOSINET_H__
00004 
00005 #include "cangelosi.h"
00006 #include "nolfinet.h"
00007 
00008 class CangCellDescr;
00009 class CangelosiCell;
00010 class CangelosiNet;
00011 
00012 
00013 
00015 //                                                                           //
00016 //     ___                     ___        | | ___                            //
00017 //    /   \  ___    _         /   \  ___  | | |  \   ___   ____  ___         //
00018 //    |      ___| |/ \   ___  |     /   ) | | |   | /   ) (     |   \ |/\    //
00019 //    |     (   | |   | (   \ |     |---  | | |   | |---   \__  |     |      //
00020 //    \___/  \__| |   |  ---/ \___/  \__  | | |__/   \__  ____)  \__/ |      //
00021 //                       __/                                                 //
00023 
00035 class CangCellDescr : public Object {
00036   public:
00037 
00038                         CangCellDescr   () {}
00039 
00044                         CangCellDescr   (const Gentainer& g, int rule, int daughter) {
00045                             decodeFrom (g, rule, daughter);
00046                         }
00047 
00056     void                decodeFrom      (const Gentainer& g, int rule, int daughter);
00057     
00060     static void         addGenesTo      (Gentainer& g, const StringMap& params);
00061 
00062   protected:
00063     int     mNewType;
00064     double  mBiasVar;
00065     double  mWeightVar;
00066     int     mDaughterLoc;
00067     double  mFaceVar;
00068     double  mSegLengthVar;
00069     double  mSegAngleVar;
00070     double  mTipRadiusMul;
00071 
00072     friend class CangelosiCell;
00073 };
00074 
00075 
00076 
00078 //                                                                          //
00079 //        ___                          |            o  ___        | |       //
00080 //       /   \  ___    _          ___  |       ____   /   \  ___  | |       //
00081 //       |      ___| |/ \   ___  /   ) |  __  (     | |     /   ) | |       //
00082 //       |     (   | |   | (   \ |---  | /  \  \__  | |     |---  | |       //
00083 //       \___/  \__| |   |  ---/  \__  | \__/ ____) | \___/  \__  | |       //
00084 //                          __/                                             //
00086 
00091 class CangelosiCell : public NolfiCell {
00092   public:
00093 
00094                             CangelosiCell   () {make ();}
00095 
00099                             CangelosiCell   (const CangelosiCell& mother,
00100                                              const CangCellDescr& rule);
00101 
00104     void                    make            ();
00105     
00108     void                    add             (const CangCellDescr& rule);
00109 
00112     void                    connect         (const Array<CangelosiCell>& cells,
00113                                              ANNetwork& ann) const;
00114 
00115     // Implementations
00116     
00118     virtual void            copy            (const CangelosiCell& other);
00119 
00121     virtual OStream&        operator>>		(OStream& out) const;
00122 
00123   protected:
00125     double  mFace;
00126     
00127     friend class CangelosiNet;
00128 };
00129 
00130 
00131 
00133 //                                                                          //
00134 //        ___                          |            o |   |                 //
00135 //       /   \  ___    _          ___  |       ____   |\  |  ___   |        //
00136 //       |      ___| |/ \   ___  /   ) |  __  (     | | \ | /   ) -+-       //
00137 //       |     (   | |   | (   \ |---  | /  \  \__  | |  \| |---   |        //
00138 //       \___/  \__| |   |  ---/  \__  | \__/ ____) | |   |  \__    \       //
00139 //                          __/                                             //
00141 
00149 class CangelosiNet : public NolfiNet {
00150   public:
00151 
00157                             CangelosiNet    (int inputs, int maxhidden, int outputs,
00158                                              double xsize, double ysize, double tipRadius,
00159                                              double axonScale);
00160 
00170     void                    rewrite         (const Array<CangCellDescr>& rules,
00171                                              int cycles=5);
00172 
00173   protected:
00174 
00178     void                    makeMother      ();
00179 };
00180 
00181 #endif
00182 
00183 

Generated on Thu Feb 10 20:21:26 2005 for Annalee by doxygen1.2.18