11 #include "CsNeuralModule.h"
12 #include "CsSynapseIndividual.h"
40 {
Std_TraceMsg(0,
"Caught Error in desctructor of CsSynapseOneToOne\r\n",
"", -1,
false,
true);}
43 void CsSynapseIndividual::FromIdx(
int iVal)
50 int CsSynapseIndividual::FromIdx() {
return m_iFromIdx;}
52 void CsSynapseIndividual::ToIdx(
int iVal)
59 int CsSynapseIndividual::ToIdx() {
return m_iToIdx;}
61 std::pair<int, int> CsSynapseIndividual::SynapseIndexKey() {
return m_vSynapseKey;}
63 void CsSynapseIndividual::SetCARLSimulation()
69 std::string strKey = this->GeneratorKey();
86 bool CsSynapseIndividual::SetCARLSimulation(
int iFromIdx,
int iToIdx,
float& weight,
float& maxWt,
float& delay,
bool& connected)
88 if(iFromIdx == m_iFromIdx && iToIdx ==
m_iToIdx)
101 #pragma region DataAccesMethods
110 if(strType ==
"FROMIDX")
112 FromIdx(atoi(strValue.c_str()));
116 if(strType ==
"TOIDX")
118 ToIdx(atoi(strValue.c_str()));
124 THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType,
"Data Type", strDataType);
129 void CsSynapseIndividual::QueryProperties(CStdPtrArray<TypeProperty> &aryProperties)
131 CsSynapseGroup::QueryProperties(aryProperties);
133 aryProperties.Add(
new TypeProperty(
"FromIdx", AnimatPropertyType::Integer, AnimatPropertyDirection::Set));
134 aryProperties.Add(
new TypeProperty(
"ToIdx", AnimatPropertyType::Integer, AnimatPropertyDirection::Set));
139 void CsSynapseIndividual::Load(CStdXml &oXml)
141 CsSynapseGroup::Load(oXml);
145 FromIdx(oXml.GetChildInt(
"FromIdx", m_iFromIdx));
146 ToIdx(oXml.GetChildInt(
"ToIdx",
m_iToIdx));
Contains the classes for a firing rate neural model.
bool m_bPlastic
connection type, either SYN_FIXED or SYN_PLASTIC
float m_fltInitWt
initial weight strength (arbitrary units); should be negative for inhibitory connections ...
Declares the CsNeuronGroup class.
CsNeuronGroup * m_lpFromNeuron
The pointer to pre-synaptic neuron.
unsigned char m_iMinDelay
the minimum delay allowed (ms)
std::pair< int, int > m_vSynapseKey
The synapse index key used in the synapse map.
Simulator * m_lpSim
The pointer to a Simulation.
int m_iToIdx
The Jth neuron of the post-synaptic group to connect.
bool Std_IsAboveMin(int iMinVal, int iVal, bool bThrowError, std::string strParamName, bool bInclusiveLimit)
Tests if a number is above a minimum value.
AnimatSim::Environment::Structure * m_lpStructure
The pointer to this items parent Structure. If this is not relevant for this object then this is NULL...
Declares the synapse class.
CsSynapseIndividual()
Default constructor.
virtual ~CsSynapseIndividual()
Destructor.
int m_iFromIdx
The Ith neuron of the pre-synaptic group to connect.
Firing rate synapse model.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
CsNeuronGroup * m_lpToNeuron
The pointer to post-synaptic neuron.
float m_fltMaxWt
upper bound on weight strength (arbitrary units); should be negative for inhibitory connections ...
bool m_bEnabled
Tells if this item is enabled or not. If it is not enabled then it is not run.
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
Firing rate synapse model.
virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError=true)
Set a variable based on a string data type name.
std::string Std_CheckString(std::string strVal)
Converts a string to upper case and trims it.
virtual CsConnectionGenerator * FindConnectionGenerator(std::string strID, bool bThrowError=true)
Searches for an item with the specified ID and sets its index in the array.
CsNeuralModule * m_lpCsModule
Pointer to parent CsNeuralModule.