#ifndef _HPP_VECLEARN #define _HPP_VECLEARN #include "libcsim.hpp" #include "layer.hpp" #include "vconnection.hpp" class veclearning : public SimElement { protected: layer *TargetLayer, *SourceLayer; int ns, nt; // target and source layer dimensions VecConnection *con; float maxWeight, minWeight; int Dmax; int maximumDelay; vector *PSynWeights; vector* PSynSourceNr; vector* PSynTargetNr; vector* PSynDelays; vector >* PPreSynNr; vector > >* Pdelays; public: veclearning(VecConnection* con, float _maxWeight=1); ~veclearning(); virtual int proceede(int)=0; virtual int prepare(int =0)=0; // virtual void SetMinWeight(float value); // removed extra qualification learning:: // virtual void SetMaxWeight(float value); }; class VecLearnHebbLP2: public veclearning { protected: float **LTP; float LtpDecFac; float LtpInc; bool Accumulate; float LearnSpeed; float BaseLine; public: VecLearnHebbLP2(VecConnection* con, float _MaxWeight=1, float TauDec=20, float BaseLine=0.1, float _LearnSpeed=0.001, bool _Accumulate=true); ~VecLearnHebbLP2(); virtual int proceede(int =0); virtual int prepare(int =0); virtual int WriteSimInfo(fstream &fw); }; class VecLearnPrePost: public veclearning { protected: float **LPpre; //presynaptic potentials float *LPpost; // postsynaptic potentials float dec_pre, dec_post; // decay of presynaptic and postsynaptic learning potential public: VecLearnPrePost(VecConnection* con, float _maxWeight=1, float TauLearnPre=30, float TauLearnPost=30); ~VecLearnPrePost(); virtual int proceede(int =0)=0; virtual int prepare(int =0); }; // wie LearnHebbLP2, aber mit st�rkerer Gewichts�nderung bei hoher // postsynaptischer Rate (d.h. Multiplikation der lernrate mit dem Postsynaptischen Spike Trace) // daher auch von LearnPrePost abgeleitet class VecLearnHebbLP3: public VecLearnPrePost { protected: float LearnRate, BaseLine; float LtpInc; bool Accumulate; public: VecLearnHebbLP3(VecConnection* con, float _maxWeight=1, float TauLearnPre=30, float TauLearnPost=30, float _BaseLine=0.2, float _LearnRate=0.0001, bool _Accumulate=false); virtual int proceede(int =0); }; #endif /*_HPP_VECLEARN */