AnimatLab  2
Test
Synapse.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace FiringRateSim
10 {
11 
17  namespace Synapses
18  {
29  class FAST_NET_PORT Synapse : public AnimatSim::Link
30  {
31  protected:
34 
36  CStdPtrArray<Synapse> m_arySynapses;
37 
39  float m_fltWeight;
40 
43 
45  std::string m_strFromID;
46 
48  Neuron *m_lpFromNeuron;
49 
51  Neuron *m_lpToNeuron;
52 
53  //Determines whether this adapter uses a delay buffer.
54  bool m_bHasDelay;
55 
56  //The duration of the delay buffer.
57  float m_fltDelayInterval;
58 
61  CStdCircularArray<float> m_aryDelayBuffer;
62 
63  Synapse *LoadSynapse(CStdXml &oXml);
64 
65  public:
66  Synapse();
67  virtual ~Synapse();
68 
77  Neuron *FromNeuron() {return m_lpFromNeuron;};
78 
79  float Weight();
80  void Weight(float fltVal);
81  float *WeightPointer();
82 
83  virtual bool HasDelay();
84  virtual void HasDelay(bool bVal);
85 
86  virtual void DelayInterval(float fltVal);
87  virtual float DelayInterval();
88 
89  virtual void SetDelayBufferSize();
90  virtual float CalculateCurrent();
91 
92  float Modulation();
93  float *ModulationPointer();
94  virtual float CalculateModulation(FiringRateModule *lpModule);
95  virtual Synapse *GetCompoundSynapse(short iCompoundIndex);
96  virtual int FindSynapseListPos(std::string strID, bool bThrowError = true);
97  virtual void AddSynapse(std::string strXml, bool bDoNotInit);
98  virtual void RemoveSynapse(std::string strID, bool bThrowError = true);
99 
100  virtual void Process(float &fltCurrent);
101 
102 #pragma region DataAccesMethods
103  virtual float *GetDataPointer(const std::string &strDataType);
104  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
105  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
106  virtual bool AddItem(const std::string &strItemType, const std::string &strXml, bool bThrowError = true, bool bDoNotInit = false);
107  virtual bool RemoveItem(const std::string &strItemType, const std::string &strID, bool bThrowError = true);
108 #pragma endregion
109 
132  virtual void SetSystemPointers(Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify);
133  virtual void VerifySystemPointers();
134  virtual void ResetSimulation();
135  virtual void Initialize();
136  virtual void TimeStepModified();
137  virtual void Load(CStdXml &oXml);
138  };
139 
140  } //Synapses
141 } //FiringRateSim
Neuron * m_lpToNeuron
The pointer to post-synaptic neuron.
Definition: Synapse.h:51
Firing rate neural module.
Neuron * m_lpFromNeuron
The pointer to pre-synaptic neuron.
Definition: Synapse.h:48
float m_fltWeight
The weight of the synapse. This is a current value in nanoamps.
Definition: Synapse.h:39
CStdCircularArray< float > m_aryDelayBuffer
Definition: Synapse.h:61
CStdPtrArray< Synapse > m_arySynapses
Array of moduled/gated child synapses.
Definition: Synapse.h:36
Neuron * FromNeuron()
Gets the pre-synaptic neuron.
Definition: Synapse.h:77
FiringRateModule * m_lpFRModule
Pointer to parent FiringRateModule.
Definition: Synapse.h:33
Contains the classes for a firing rate neural model.
Firing rate synapse model.
Definition: Synapse.h:29
float m_fltModulation
The modulation value to use for this synapse.
Definition: Synapse.h:42
std::string m_strFromID
GUID ID of the pre-synaptic neruon.
Definition: Synapse.h:45