AnimatLab
2
Test
|
#include <Connexion.h>
Public Member Functions | |
Connexion () | |
Default constructor. More... | |
Connexion (int type, int id, double d, float topBlock=75, float botBlock=25) | |
Constructor. More... | |
virtual | ~Connexion () |
Destructor. More... | |
void | BaseConductance (double dVal) |
Sets the base conductance. More... | |
double | BaseConductance () |
Gets the base conductance. More... | |
void | Delay (double dVal) |
Sets the synaptic delay. More... | |
double | Delay () |
Gets the synaptic delay. More... | |
virtual float * | GetDataPointer (const std::string &strDataType) |
Returns a float pointer to a data item of interest in this object. More... | |
virtual void | Load (CStdXml &oXml) |
virtual void | QueryProperties (CStdPtrArray< TypeProperty > &aryProperties) |
void | ResetIDs () |
Resets the IDs of the synapse types. More... | |
virtual void | ResetSimulation () |
Resets the simulation back to time 0. More... | |
virtual bool | SetData (const std::string &strDataType, const std::string &strValue, bool bThrowError=true) |
Set a variable based on a string data type name. More... | |
virtual void | SetSystemPointers (Simulator *lpSim, Structure *lpStructure, AnimatSim::Behavior::NeuralModule *lpModule, Node *lpNode, bool bVerify) |
std::string | SourceID () |
Gets the source neuron ID. More... | |
void | SourceID (std::string strID) |
Sets the source neuron ID. More... | |
std::string | SynapseTypeID () |
Gets the synapse type identifier. More... | |
void | SynapseTypeID (std::string strID) |
Sets the synapse type identifier. More... | |
std::string | TargetID () |
Gets the target neuron ID. More... | |
void | TargetID (std::string strID) |
Sets the target neuron ID. More... | |
virtual void | VerifySystemPointers () |
Verify that system pointers have been set correctly. More... | |
Public Member Functions inherited from AnimatSim::Link | |
Link () | |
Default constructor. More... | |
virtual | ~Link () |
Destructor. More... | |
virtual bool | Enabled () |
Gets whether the link is enabled. More... | |
virtual void | Enabled (bool bValue) |
Sets whether the link is Enabled. More... | |
virtual void | QueryProperties (CStdPtrArray< TypeProperty > &aryProperties) |
Queries this object for a list of properties that can be changed using SetData. More... | |
virtual void | SetSystemPointers (Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule, Node *lpNode, bool bVerify) |
Sets the system pointers. More... | |
Public Member Functions inherited from AnimatSim::AnimatBase | |
AnimatBase () | |
Constructs an AnimatBase object. More... | |
virtual | ~AnimatBase () |
Destroys the AnimatBase object.. More... | |
virtual bool | AddItem (const std::string &strItemType, const std::string &strXml, bool bThrowError=true, bool bDoNotInit=false) |
Adds a new object to this parent. More... | |
virtual void | AfterResetSimulation () |
Called after a simulation reset for some objects. More... | |
virtual long | CalculateSnapshotByteSize () |
Calculates the snapshot byte size. More... | |
virtual void | Copy (CStdSerialize *lpSource) |
virtual NeuralModule * | GetNeuralModule () |
Gets the neural module. More... | |
virtual Node * | GetNode () |
Gets the node. More... | |
virtual Simulator * | GetSimulator () |
Gets the simulator pointer. More... | |
virtual Structure * | GetStructure () |
Gets the structure for this node. More... | |
virtual bool | HasProperty (const std::string &strName) |
Queries this object if it has a property with the given name. More... | |
virtual std::string | ID () |
Gets the unique GUID ID of this object. More... | |
virtual void | ID (std::string strValue) |
Sets the unique GUID ID of the object. More... | |
virtual void | Initialize () |
Initializes this object. More... | |
virtual void | Kill (bool bState=true) |
Kills. More... | |
virtual void | Load (StdUtils::CStdXml &oXml) |
Loads the item using an XML data packet. More... | |
virtual void | LoadKeyFrameSnapshot (byte *aryBytes, long &lIndex) |
Loads a key frame snapshot. More... | |
virtual std::string | Name () |
Gets the name of this object. More... | |
virtual void | Name (std::string strValue) |
Sets the name of the object. Blank is acceptable. More... | |
virtual AnimatPropertyType | PropertyType (const std::string &strName) |
virtual void | ReInitialize () |
Re-initialize this object. More... | |
virtual bool | RemoveItem (const std::string &strItemType, const std::string &strID, bool bThrowError=true) |
Removes a child item from this parent. More... | |
virtual void | Reset () |
Resets this object. More... | |
virtual void | RigidBodyAdded (std::string strID) |
virtual void | RigidBodyRemoved (std::string strID) |
virtual void | SaveKeyFrameSnapshot (byte *aryBytes, long &lIndex) |
Saves a key frame snapshot. More... | |
virtual bool | Selected () |
Tells if this items is selected or not. More... | |
virtual void | Selected (bool bValue, bool bSelectMultiple) |
Selects this object. More... | |
virtual bool | SetData (const std::string &strDataType, const float fltValue, bool bThrowError=true) |
Set a variable based on a string data type name. More... | |
virtual bool | SetData (const std::string &strDataType, const long lValue, bool bThrowError=true) |
Set a variable based on a string data type name. More... | |
virtual void | SimPausing () |
Called just before the simulation pauses. More... | |
virtual void | SimStarting () |
Called just before the simulation starts. More... | |
virtual void | SimStopping () |
Called just before the simulation stops. More... | |
virtual void | StepSimulation () |
Step the simulation for this object. More... | |
virtual void | TimeStepModified () |
Notification method that the time step modified has been modified. Objects should recalculate any slice times as needed. More... | |
virtual std::string | Type () |
returns the string type name of this object. More... | |
virtual void | Type (std::string strValue) |
Sets the class type for this object. More... | |
virtual void | VisualSelectionModeChanged (int iNewMode) |
Visual selection mode changed. More... | |
Protected Member Functions | |
bool | AllowForgetting () |
Gets whether forgetting is allowed. More... | |
void | AppendTransitSpike () |
Appends the transit spike. More... | |
double | Consolidation () |
Gets the consolidation factor. More... | |
void | DecrementFacilitation () |
Decrements the facilitation. More... | |
void | DecrementLatencies (double dt, bool FreezeLearning=false) |
Decrements latencies. More... | |
double | FacilD () |
Gets the facilitation decrement value. More... | |
double | ForgettingWindow () |
Gets the forgetting time window. More... | |
double | GetProspectiveCond (bool bFreezeHebb) |
Gets a prospective condutance. More... | |
double * | GetTimeToNextSpikePtr () |
Gets the time to next spike pointer. More... | |
bool | Hebbian () |
Gets if the synapse type is Hebbian. More... | |
double | HebbIncrement () |
Increments the hebbian weight. More... | |
double | HebbTimeWindow () |
Gets the hebbian time window. More... | |
void | IncrementHebbian () |
Increments hebbian values. More... | |
double | MaxGHebb () |
Gets the maximum hebbian conductance. More... | |
double | MaxGVoltDepRel () |
Gets the maximum conductance for voltage dependent. More... | |
double | ProcessOutput (bool bFreezeHebb=false) |
Process the output described of the connection. More... | |
double | RelFacil () |
Gets the relative facilitation. More... | |
bool | VoltDep () |
Gets whether the synapse type is voltage dependent. More... | |
Protected Member Functions inherited from AnimatSim::Link | |
virtual void | UpdateData () |
Called during the StepSimulation method to allow the link to update any internal data for reporting purposes. More... | |
Protected Attributes | |
double | m_dBaseG |
The base conductance. | |
double | m_dDelay |
The synaptic delay. | |
double | m_dG |
The synaptic conductance. | |
double | m_dGFacilCx |
facilitated increase in g when input occurs | |
double | m_dPreviousSpikeLatency |
The partial block. More... | |
double | m_dTimeSincePrevHebbEvent |
The time since previous hebb event. | |
float | m_fltGFailCxReport |
reported variable for facilitated increase in g when input occurs | |
float | m_fltGReport |
The reported variable for synaptic conductance. | |
DoubleList | m_HebbList |
List of hebbian events. | |
int | m_iID |
Identifier ID for this connection. | |
int | m_iSource |
Zero-based index of the source neuron. | |
int | m_iTarget |
Zero-based index of the target neuron. | |
int | m_iType |
Zero-based index of the synaspe type. | |
IntegrateFireNeuralModule * | m_lpIGFModule |
The pointer to the parent IntegrateFireNeuralModule. | |
Neuron * | m_lpSource |
Pointer to the source Neuron. | |
SynapseType * | m_lpSynType |
Pointer to the synapse type for this connection. | |
Neuron * | m_lpTarget |
Pointer to the target Neuron. | |
std::string | m_strSourceID |
GUID ID for the source Neuron. | |
std::string | m_strSynapseTypeID |
GUID ID for the synapse type to use. | |
std::string | m_strTargetID |
GUID ID for the target Neuron. | |
DoubleList | m_TransitCx |
Sets whether there is a partial block hold. More... | |
Protected Attributes inherited from AnimatSim::Link | |
float | m_fltEnabled |
This is for reporting purposes. | |
Organism * | m_lpOrganism |
The pointer to this link's organism. | |
Protected Attributes inherited from AnimatSim::AnimatBase | |
bool | m_bEnabled |
Tells if this item is enabled or not. If it is not enabled then it is not run. | |
bool | m_bSelected |
Tells whether the object is selected or not. | |
AnimatSim::Behavior::NeuralModule * | m_lpModule |
The pointer to this items parentNeuralModule. If this is not relevant for this object then this is NULL. | |
Node * | m_lpNode |
The pointer to this items parent Node. If this is not relevant for this object then this is NULL. | |
Simulator * | m_lpSim |
The pointer to a Simulation. | |
AnimatSim::Environment::Structure * | m_lpStructure |
The pointer to this items parent Structure. If this is not relevant for this object then this is NULL. | |
std::string | m_strID |
The unique Id for this object. | |
std::string | m_strName |
The name for this object. | |
std::string | m_strType |
The type for this object. Examples are Box, Plane, Neuron, etc.. | |
Friends | |
class | IntegrateFireSim::IntegrateFireNeuralModule |
Additional Inherited Members | |
Static Public Member Functions inherited from AnimatSim::Link | |
static Link * | CastToDerived (AnimatBase *lpBase) |
Synaptic Connexion.
This is a synaptic connection between two neurons. It uses the SynapseType to determine how it behaves. (non-spiking chemical, spiking chemical, or eletrical). It has a base conductance value that is varied depending on the type of synapse. For example, a spiking chemical synapse increases the conductance to the maximum value when a spike occurs, and then exponentially declines to zero.
Definition at line 29 of file Connexion.h.
IntegrateFireSim::Synapses::Connexion::Connexion | ( | ) |
Default constructor.
Definition at line 29 of file Connexion.cpp.
References m_dBaseG, m_dDelay, m_dG, m_dGFacilCx, m_dPreviousSpikeLatency, m_dTimeSincePrevHebbEvent, m_fltGFailCxReport, m_fltGReport, m_iSource, m_iTarget, and m_lpSynType.
IntegrateFireSim::Synapses::Connexion::Connexion | ( | int | type, |
int | ID, | ||
double | delay, | ||
float | topBlock = 75 , |
||
float | botBlock = 25 |
||
) |
Constructor.
type | The synapse type. |
ID | The identifier. |
delay | The synaptic delay. |
topBlock | The top block. |
botBlock | The bottom block. |
Definition at line 60 of file Connexion.cpp.
References AnimatSim::AnimatBase::ID(), m_dBaseG, m_dDelay, m_dG, m_dGFacilCx, m_dPreviousSpikeLatency, m_dTimeSincePrevHebbEvent, m_fltGFailCxReport, m_fltGReport, m_iID, m_iSource, m_iTarget, m_iType, and m_lpSynType.
|
virtual |
|
protected |
Gets whether forgetting is allowed.
Definition at line 412 of file Connexion.cpp.
References IntegrateFireSim::Synapses::SpikingChemicalSynapse::AllowForgetting(), m_lpSynType, and AnimatSim::AnimatBase::m_strID.
Referenced by GetProspectiveCond(), and ProcessOutput().
|
inlineprotected |
Appends the transit spike.
Definition at line 157 of file Connexion.h.
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::CalcUpdate().
void IntegrateFireSim::Synapses::Connexion::BaseConductance | ( | double | dVal | ) |
Sets the base conductance.
dVal | The new value. |
Definition at line 102 of file Connexion.cpp.
References m_dBaseG, m_dG, m_dGFacilCx, m_fltGFailCxReport, and m_fltGReport.
double IntegrateFireSim::Synapses::Connexion::BaseConductance | ( | ) |
Gets the base conductance.
Definition at line 124 of file Connexion.cpp.
References m_dBaseG.
Referenced by SetData().
|
protected |
Gets the consolidation factor.
Definition at line 458 of file Connexion.cpp.
References IntegrateFireSim::Synapses::SpikingChemicalSynapse::Consolidation(), m_lpSynType, and AnimatSim::AnimatBase::m_strID.
Referenced by GetProspectiveCond(), and ProcessOutput().
|
protected |
Decrements the facilitation.
Definition at line 278 of file Connexion.cpp.
References FacilD(), m_dG, m_dGFacilCx, m_fltGFailCxReport, and RelFacil().
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::CalcUpdate().
|
protected |
Decrements latencies.
dt | The time step. |
FreezeLearning | true to freeze learning. |
Definition at line 530 of file Connexion.cpp.
References IntegrateFireSim::Utilities::DoubleList::Del(), ForgettingWindow(), Hebbian(), IntegrateFireSim::Utilities::DoubleList::Iterate(), m_dTimeSincePrevHebbEvent, m_HebbList, and m_TransitCx.
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::CalcUpdate().
void IntegrateFireSim::Synapses::Connexion::Delay | ( | double | dVal | ) |
Sets the synaptic delay.
dVal | The new value. |
Definition at line 134 of file Connexion.cpp.
References m_dDelay.
double IntegrateFireSim::Synapses::Connexion::Delay | ( | ) |
Gets the synaptic delay.
Definition at line 144 of file Connexion.cpp.
References m_dDelay.
Referenced by SetData().
|
protected |
Gets the facilitation decrement value.
Definition at line 234 of file Connexion.cpp.
References IntegrateFireSim::Synapses::SpikingChemicalSynapse::FacilD(), m_lpSynType, and AnimatSim::AnimatBase::m_strID.
Referenced by DecrementFacilitation().
|
protected |
Gets the forgetting time window.
Definition at line 435 of file Connexion.cpp.
References IntegrateFireSim::Synapses::SpikingChemicalSynapse::ForgettingWindow(), m_lpSynType, and AnimatSim::AnimatBase::m_strID.
Referenced by DecrementLatencies(), GetProspectiveCond(), and ProcessOutput().
|
virtual |
Returns a float pointer to a data item of interest in this object.
This is a generic method used to get a pointer to data variable of interest. It is used by a variety of systems in the simulation. The most prominent are the data charting and stimulus classes. Within this method we associate a variable with a string name. By passing in the name of the data type we are interested in we can recieve back a float pointer to that data type. We can use that to read or set the data item in other classes. For example, the data charting system gets the pointer and then each time it needs to log a data point it reads the value into an array.
strDataType | name of the data item for which we are looking. |
If | DataType is not found. |
Reimplemented from AnimatSim::AnimatBase.
Definition at line 709 of file Connexion.cpp.
References m_fltGFailCxReport, m_fltGReport, and StdUtils::Std_CheckString().
|
protected |
Gets a prospective condutance.
bFreezeHebb | true to freeze hebb. |
Definition at line 658 of file Connexion.cpp.
References AllowForgetting(), Consolidation(), ForgettingWindow(), Hebbian(), m_dBaseG, m_dG, m_dGFacilCx, m_dTimeSincePrevHebbEvent, and MaxGHebb().
|
inlineprotected |
Gets the time to next spike pointer.
Definition at line 170 of file Connexion.h.
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::CalcUpdate().
|
protected |
Gets if the synapse type is Hebbian.
Definition at line 320 of file Connexion.cpp.
References IntegrateFireSim::Synapses::SpikingChemicalSynapse::Hebbian(), m_lpSynType, and AnimatSim::AnimatBase::m_strID.
Referenced by DecrementLatencies(), GetProspectiveCond(), IncrementHebbian(), IntegrateFireSim::IntegrateFireNeuralModule::InitSynapse(), and ProcessOutput().
|
protected |
Increments the hebbian weight.
Definition at line 343 of file Connexion.cpp.
References IntegrateFireSim::Synapses::SpikingChemicalSynapse::HebbIncrement(), m_lpSynType, and AnimatSim::AnimatBase::m_strID.
Referenced by IncrementHebbian().
|
protected |
Gets the hebbian time window.
Definition at line 366 of file Connexion.cpp.
References IntegrateFireSim::Synapses::SpikingChemicalSynapse::HebbTimeWindow(), m_lpSynType, and AnimatSim::AnimatBase::m_strID.
Referenced by IncrementHebbian(), and ProcessOutput().
|
protected |
Increments hebbian values.
Definition at line 570 of file Connexion.cpp.
References Hebbian(), HebbIncrement(), HebbTimeWindow(), IntegrateFireSim::Utilities::DoubleList::Iterate(), m_dG, m_dGFacilCx, m_dTimeSincePrevHebbEvent, m_fltGFailCxReport, m_fltGReport, m_HebbList, and MaxGHebb().
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::CalcUpdate().
|
protected |
Gets the maximum hebbian conductance.
Definition at line 389 of file Connexion.cpp.
References m_lpSynType, AnimatSim::AnimatBase::m_strID, and IntegrateFireSim::Synapses::SpikingChemicalSynapse::MaxGHebb().
Referenced by GetProspectiveCond(), IncrementHebbian(), and ProcessOutput().
|
protected |
Gets the maximum conductance for voltage dependent.
Definition at line 481 of file Connexion.cpp.
References m_lpSynType, AnimatSim::AnimatBase::m_strID, and IntegrateFireSim::Synapses::SpikingChemicalSynapse::MaxGVoltDepRel().
|
protected |
Process the output described of the connection.
bFreezeHebb | true to freeze hebb. |
Definition at line 607 of file Connexion.cpp.
References IntegrateFireSim::Utilities::DoubleList::AddTail(), AllowForgetting(), Consolidation(), IntegrateFireSim::Utilities::DoubleList::Del(), ForgettingWindow(), Hebbian(), HebbTimeWindow(), m_dBaseG, m_dG, m_dGFacilCx, m_dTimeSincePrevHebbEvent, m_fltGFailCxReport, m_fltGReport, m_HebbList, m_TransitCx, MaxGHebb(), and RelFacil().
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::CalcUpdate().
|
protected |
Gets the relative facilitation.
Definition at line 257 of file Connexion.cpp.
References m_lpSynType, AnimatSim::AnimatBase::m_strID, and IntegrateFireSim::Synapses::SpikingChemicalSynapse::RelFacil().
Referenced by DecrementFacilitation(), and ProcessOutput().
void IntegrateFireSim::Synapses::Connexion::ResetIDs | ( | ) |
Resets the IDs of the synapse types.
Definition at line 212 of file Connexion.cpp.
References m_iID, m_iSource, m_iTarget, m_lpSource, m_lpSynType, m_lpTarget, IntegrateFireSim::Neuron::NeuronID(), and IntegrateFireSim::Synapses::SynapseType::SynapseTypeID().
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::ResetIDs().
|
virtual |
Resets the simulation back to time 0.
This method calls the ResetSimulation method on all subitems in order to reset the simulation back to the beginning.
Reimplemented from AnimatSim::AnimatBase.
Definition at line 682 of file Connexion.cpp.
References m_dBaseG, m_dG, m_dGFacilCx, m_HebbList, m_TransitCx, and IntegrateFireSim::Utilities::DoubleList::Release().
|
virtual |
Set a variable based on a string data type name.
This is a generic method that can be used to set any variable in an AnimatBase object by specifying the name of the variable and a string representation of that data. The GUI uses this method to set data into variables in the simulation when the user changes them in the UI. The value string can be as simple as a float or int, or as complex as an xml packet. It is the developers responsibilty to know what type of data is needed and to process it accordingly.
strDataType | string name of the data type to set. |
strValue | The string value of the data. It is up to the developer to determine what this should be. For example, in most cases it is simply a float and you just have to convert it to a float and make the appropriate mutator method call. However, it can be any type of string, including an entire xml packet. It is the developers responsibility to know how to set and process the data as required. |
bThrowError | true to throw error if there is a problem. If false then it will not return an error, just return false. |
Reimplemented from AnimatSim::Link.
Definition at line 725 of file Connexion.cpp.
References BaseConductance(), Delay(), m_lpIGFModule, IntegrateFireSim::IntegrateFireNeuralModule::PreCalc(), StdUtils::Std_CheckString(), and SynapseTypeID().
std::string IntegrateFireSim::Synapses::Connexion::SourceID | ( | ) |
Gets the source neuron ID.
Definition at line 174 of file Connexion.cpp.
References m_strSourceID.
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::InitSynapse().
void IntegrateFireSim::Synapses::Connexion::SourceID | ( | std::string | strID | ) |
Sets the source neuron ID.
strID | ID. |
Definition at line 184 of file Connexion.cpp.
References m_strSourceID.
std::string IntegrateFireSim::Synapses::Connexion::SynapseTypeID | ( | ) |
Gets the synapse type identifier.
Definition at line 154 of file Connexion.cpp.
References m_strSynapseTypeID.
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::InitSynapse(), and SetData().
void IntegrateFireSim::Synapses::Connexion::SynapseTypeID | ( | std::string | strID | ) |
Sets the synapse type identifier.
strID | Synapse Type ID. |
Definition at line 164 of file Connexion.cpp.
References m_strSynapseTypeID.
std::string IntegrateFireSim::Synapses::Connexion::TargetID | ( | ) |
Gets the target neuron ID.
Definition at line 194 of file Connexion.cpp.
References m_strTargetID.
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::InitSynapse().
void IntegrateFireSim::Synapses::Connexion::TargetID | ( | std::string | strID | ) |
Sets the target neuron ID.
strID | ID. |
Definition at line 204 of file Connexion.cpp.
References m_strTargetID.
|
virtual |
Verify that system pointers have been set correctly.
The system pointers should be set just after an object is created. However, if for some reason it was not then this could cause read/write memory access errors later on because we would be using NULL pointers. This method is called during SetSystemPointers, Load, and Initialize to verify that the pointers for that type of object have been set correctly. We are calling three different places to ensure that it is checked before use. For example, if you are doing a Load call then you want to check it before attempting the load, but there may be an object that does not Load, but only does Initialize. So we need to check it there as well.
Reimplemented from AnimatSim::Link.
Definition at line 699 of file Connexion.cpp.
References m_lpIGFModule, and AnimatSim::AnimatBase::m_strID.
|
protected |
Gets whether the synapse type is voltage dependent.
Definition at line 297 of file Connexion.cpp.
References m_lpSynType, AnimatSim::AnimatBase::m_strID, and IntegrateFireSim::Synapses::SpikingChemicalSynapse::VoltDep().
|
protected |
The partial block.
The previous spike latency
Definition at line 149 of file Connexion.h.
Referenced by Connexion(), and IntegrateFireSim::IntegrateFireNeuralModule::InitSynapse().
|
protected |
Sets whether there is a partial block hold.
Delay line for synaptic delays.
Definition at line 122 of file Connexion.h.
Referenced by IntegrateFireSim::IntegrateFireNeuralModule::CalcUpdate(), DecrementLatencies(), IntegrateFireSim::IntegrateFireNeuralModule::PostCalc(), ProcessOutput(), and ResetSimulation().