123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #ifndef _HPP_VNORMALIZE
- #define _HPP_VNORMALIZE
- #include "normalize.hpp"
- #include "vconnection.hpp"
- #include "layer.hpp"
- #include "typedefs.hpp"
- /*! \brief VecNormalize
- *
- * is friend class of VecConnection
- * normalizes synaptic weights of a VecConnection
- */
- class VecNormalize: public AbstractNormalize
- {
- protected:
- layer* Target;
- TVecConnectionList ConList; ///< Vector der zu normalisierenden Connections
- int NTarget;
- int NSource;
- public:
- VecNormalize();
- virtual int AddConnection(VecConnection* newcon);
- virtual int proceede(int =0) =0;
- virtual int prepare(int =0) =0;
- virtual int WriteSimInfo(fstream &fw);
- virtual int WriteSimInfo(fstream &fw, const string &ChildInfo);
- virtual void SetRewiring(float SynDelThreshold, float IncommingConnectivity, float InitialWeights);
- int Rewire();
- };
- /*! \brief VecFiringRateNormalize2
- *
- */
- class VecFiringRateNormalize2: public VecNormalize
- {
- protected:
- int* PostSynLastFirings;
- float Tau;
- float* NormLut;
- int NormLutN;
- float MaxNormFactor;
- float NormDeltaT;
- float NormFactor;
- float NormFrequency;
- public:
- VecFiringRateNormalize2(float NormFrequency=1, float NormFactor=0.001, float MaxNormFactor=10);
- virtual int AddConnection(VecConnection* newcon);
- virtual int proceede(int =0);
- virtual int prepare(int =0);
- virtual int WriteSimInfo(fstream &fw);
- };
- /*! \brief VecConstSumNormalize
- *
- */
- class VecConstSumNormalize: public VecNormalize
- {
- protected:
- float* PostSynWeightSum;
- float WeightSum;
- int* PostSynLastFirings;
- bool quadratic;
- public:
- VecConstSumNormalize(float _WeightSum=1, bool _quadratic=false);
- virtual int proceede(int =0);
- int NormalizeAll();
- void CalcInitWeightSum(); //calculate weight sum from initial weight distribution
- float GetWeightSum();
- int SetWeightSum(float NewWeightSum);
- virtual int WriteSimInfo(fstream &fw);
- virtual int prepare(int =0);
- };
- #endif /*_HPP_VNORMALIZE */
|