00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef VERVE_PROJECTION_H
00025 #define VERVE_PROJECTION_H
00026
00027 #include "Globals.h"
00028
00029 namespace verve
00030 {
00031 class Population;
00032 class Neuron;
00033 class Connection;
00034
00036 enum InitialWeightMethod
00037 {
00039 IDEAL_NOISE,
00040
00042 WEIGHTS_NEAR_0,
00043
00045 WEIGHTS_NEAR_1
00046 };
00047
00050 class Projection
00051 {
00052 public:
00053 VERVE_DECL Projection();
00054
00056 VERVE_DECL virtual ~Projection();
00057
00062 VERVE_DECL virtual void VERVE_CALL init(Population* pop1,
00063 Population* pop2, InitialWeightMethod initWeightMethod,
00064 real maxInputPopActivationSum);
00065
00070 VERVE_DECL virtual void VERVE_CALL init(Population* pop,
00071 Neuron* neuron, InitialWeightMethod initWeightMethod,
00072 real maxInputPopActivationSum);
00073
00078 VERVE_DECL virtual void VERVE_CALL init(Neuron* neuron,
00079 Population* pop, InitialWeightMethod initWeightMethod,
00080 real maxInputPopActivationSum);
00081
00083 VERVE_DECL virtual void VERVE_CALL resetShortTermMemory();
00084
00087 VERVE_DECL virtual void VERVE_CALL addPreNeuron(Neuron* neuron);
00088
00090 VERVE_DECL virtual unsigned int VERVE_CALL getNumConnections()const;
00091
00093 VERVE_DECL virtual Connection* VERVE_CALL getConnection(
00094 unsigned int i);
00095
00099
00100
00101
00104
00105
00111
00112
00113 protected:
00115 void clear();
00116
00119 void setInitialConnectionWeights();
00120
00123 void setInitialConnectionWeight(Connection* c);
00124
00126 void createConnections(Neuron* neuron, Population* pop);
00127
00130 void storeTargetNeuronReferences(Population* pop);
00131
00134 void storeTargetNeuronReferences(Neuron* neuron);
00135
00139 virtual void connectNeurons(Neuron* neuron1,
00140 Neuron* neuron2);
00141
00143 std::vector<Connection*> mConnections;
00144
00147 std::vector<Neuron*> mTargetNeurons;
00148
00150 InitialWeightMethod mInitialWeightMethod;
00151
00154 real mMaxInputPopActivationSum;
00155 };
00156 }
00157
00158 #endif