MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SynHandlerBase Class Referenceabstract

#include <SynHandlerBase.h>

+ Inheritance diagram for SynHandlerBase:
+ Collaboration diagram for SynHandlerBase:

Public Member Functions

virtual void addSpike (unsigned int index, double time, double weight)=0
 
virtual unsigned int addSynapse ()=0
 
virtual void dropSynapse (unsigned int droppedSynNumber)=0
 
unsigned int getNumSynapses () const
 
SynapsegetSynapse (unsigned int i)
 
virtual double getTopSpike (unsigned int index) const =0
 
void process (const Eref &e, ProcPtr p)
 
bool rangeWarning (const string &field, double value)
 
void reinit (const Eref &e, ProcPtr p)
 
void setNumSynapses (unsigned int num)
 
 SynHandlerBase ()
 
virtual unsigned int vGetNumSynapses () const =0
 
virtual SynapsevGetSynapse (unsigned int i)=0
 
virtual void vProcess (const Eref &e, ProcPtr p)=0
 
virtual void vReinit (const Eref &e, ProcPtr p)=0
 
virtual void vSetNumSynapses (unsigned int num)=0
 
virtual ~SynHandlerBase ()
 

Static Public Member Functions

static SrcFinfo1< double > * activationOut ()
 
static const CinfoinitCinfo ()
 

Detailed Description

This is a pure virtual base class for accessing and handling synapses. It provides a uniform interface so that all classes that use synapses can do so without duplication. The derived classes have the responsibility of handling the synaptic events as well as possible return events from the parent.

Definition at line 22 of file SynHandlerBase.h.

Constructor & Destructor Documentation

SynHandlerBase::SynHandlerBase ( )

Definition at line 94 of file SynHandlerBase.cpp.

95 {
96  ;
97 }
SynHandlerBase::~SynHandlerBase ( )
virtual

Definition at line 99 of file SynHandlerBase.cpp.

100 {
101  ;
102 }

Member Function Documentation

SrcFinfo1< double > * SynHandlerBase::activationOut ( )
static

Definition at line 16 of file SynHandlerBase.cpp.

Referenced by initCinfo(), SeqSynHandler::vProcess(), GraupnerBrunel2012CaPlasticitySynHandler::vProcess(), SimpleSynHandler::vProcess(), and STDPSynHandler::vProcess().

17 {
19  "activationOut",
20  "Sends out level of activation on all synapses converging to "
21  "this SynHandler"
22  );
23  return &activationOut;
24 }
static SrcFinfo1< double > * activationOut()

+ Here is the caller graph for this function:

virtual void SynHandlerBase::addSpike ( unsigned int  index,
double  time,
double  weight 
)
pure virtual

Record arrival of a new spike event. The 'time' is time for eventual arrival of the spike, and is typically well in the future. The index specifies which synapse the spike came to.

Implemented in STDPSynHandler, SimpleSynHandler, GraupnerBrunel2012CaPlasticitySynHandler, and SeqSynHandler.

Referenced by Synapse::addSpike().

+ Here is the caller graph for this function:

virtual unsigned int SynHandlerBase::addSynapse ( )
pure virtual

Adds a new synapse, returns its index. This is triggered by addMsg of inputs to the child synapse. The SynHandler has to ensure that we have enough synapses allocated to handle the new message, and the return value is used so that the new message knows the fieldIndex to send the message to.

Implemented in STDPSynHandler, SimpleSynHandler, GraupnerBrunel2012CaPlasticitySynHandler, and SeqSynHandler.

Referenced by Synapse::addMsgCallback().

+ Here is the caller graph for this function:

virtual void SynHandlerBase::dropSynapse ( unsigned int  droppedSynNumber)
pure virtual

Drops an existing synapse, triggered by deleteMsg of an input to the child synapse. This is a little messy because we can't change the indices of the other synapses. The Handler has to figure out how to handle the 'holes' in its array of synapses.

Implemented in STDPSynHandler, SimpleSynHandler, GraupnerBrunel2012CaPlasticitySynHandler, and SeqSynHandler.

Referenced by Synapse::dropMsgCallback().

+ Here is the caller graph for this function:

unsigned int SynHandlerBase::getNumSynapses ( ) const

Returns number of synapses defined.

Definition at line 109 of file SynHandlerBase.cpp.

References vGetNumSynapses().

Referenced by SimpleSynHandler::initCinfo(), SeqSynHandler::initCinfo(), initCinfo(), STDPSynHandler::initCinfo(), GraupnerBrunel2012CaPlasticitySynHandler::initCinfo(), and testSetGetVec().

110 {
111  return vGetNumSynapses();
112 }
virtual unsigned int vGetNumSynapses() const =0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Synapse * SynHandlerBase::getSynapse ( unsigned int  i)

Gets specified synapse

Definition at line 114 of file SynHandlerBase.cpp.

References vGetSynapse().

Referenced by SimpleSynHandler::initCinfo(), SeqSynHandler::initCinfo(), STDPSynHandler::initCinfo(), and GraupnerBrunel2012CaPlasticitySynHandler::initCinfo().

115 {
116  return vGetSynapse( i );
117 }
virtual Synapse * vGetSynapse(unsigned int i)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual double SynHandlerBase::getTopSpike ( unsigned int  index) const
pure virtual

Implemented in STDPSynHandler, SimpleSynHandler, GraupnerBrunel2012CaPlasticitySynHandler, and SeqSynHandler.

Referenced by Synapse::getTopSpike().

+ Here is the caller graph for this function:

const Cinfo * SynHandlerBase::initCinfo ( )
static

These are the base set of fields for any object managing synapses. Note that these are duplicated in SynChanBase: if you change anything here it must also be reflected there.

Definition at line 31 of file SynHandlerBase.cpp.

References activationOut(), getNumSynapses(), Neutral::initCinfo(), process(), reinit(), setNumSynapses(), and synHandlerCinfo.

Referenced by SimpleSynHandler::initCinfo(), SeqSynHandler::initCinfo(), STDPSynHandler::initCinfo(), and GraupnerBrunel2012CaPlasticitySynHandler::initCinfo().

32 {
34  "numSynapses",
35  "Number of synapses on SynHandler. Duplicate field for num_synapse",
38  );
40  static DestFinfo process( "process",
41  "Handles 'process' call. Checks if any spike events are due for"
42  "handling at this timestep, and does learning rule stuff if needed",
44  static DestFinfo reinit( "reinit",
45  "Handles 'reinit' call. Initializes all the synapses.",
47 
48  static Finfo* processShared[] =
49  {
50  &process, &reinit
51  };
52  static SharedFinfo proc( "proc",
53  "Shared Finfo to receive Process messages from the clock.",
54  processShared, sizeof( processShared ) / sizeof( Finfo* )
55  );
56 
58  static Finfo* synHandlerFinfos[] =
59  {
60  &numSynapses, // Value
61  activationOut(), // SrcFinfo
62  &proc, // SharedFinfo
63  };
64 
65  static string doc[] =
66  {
67  "Name", "SynHandlerBase",
68  "Author", "Upi Bhalla",
69  "Description",
70  "Base class for handling synapse arrays converging onto a given "
71  "channel or integrate-and-fire neuron. This class provides the "
72  "interface for channels/intFires to connect to a range of synapse "
73  "types, including simple synapses, synapses with different "
74  "plasticity rules, and variants yet to be implemented. "
75  };
76  static ZeroSizeDinfo< int > dinfo;
77  static Cinfo synHandlerCinfo (
78  "SynHandlerBase",
80  synHandlerFinfos,
81  sizeof( synHandlerFinfos ) / sizeof ( Finfo* ),
82  &dinfo,
83  doc,
84  sizeof( doc ) / sizeof( string )
85  );
86 
87  return &synHandlerCinfo;
88 }
void setNumSynapses(unsigned int num)
unsigned int getNumSynapses() const
void reinit(const Eref &e, ProcPtr p)
static const Cinfo * synHandlerCinfo
static SrcFinfo1< double > * activationOut()
static const Cinfo * initCinfo()
Definition: Neutral.cpp:16
void process(const Eref &e, ProcPtr p)
Definition: Cinfo.h:18
Definition: Finfo.h:12

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SynHandlerBase::process ( const Eref e,
ProcPtr  p 
)

Definition at line 119 of file SynHandlerBase.cpp.

References vProcess().

Referenced by initCinfo().

120 {
121  vProcess( e, p );
122 }
virtual void vProcess(const Eref &e, ProcPtr p)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool SynHandlerBase::rangeWarning ( const string &  field,
double  value 
)

A utility function to check for assignment to fields that must be > 0

Definition at line 129 of file SynHandlerBase.cpp.

References RANGE.

Referenced by GraupnerBrunel2012CaPlasticitySynHandler::setTauCa(), STDPSynHandler::setTauMinus(), STDPSynHandler::setTauPlus(), and GraupnerBrunel2012CaPlasticitySynHandler::setTauSyn().

130 {
131  if ( value < RANGE )
132  {
133  cout << "Warning: Ignored attempt to set " << field <<
134  " of SynHandler " <<
135  // c->target().e->name() <<
136  " to less than " << RANGE << endl;
137  return 1;
138  }
139  return 0;
140 }
uint32_t value
Definition: moosemodule.h:42
static const double RANGE

+ Here is the caller graph for this function:

void SynHandlerBase::reinit ( const Eref e,
ProcPtr  p 
)

Definition at line 124 of file SynHandlerBase.cpp.

References vReinit().

Referenced by initCinfo().

125 {
126  vReinit( e, p );
127 }
virtual void vReinit(const Eref &e, ProcPtr p)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SynHandlerBase::setNumSynapses ( unsigned int  num)

Resizes the synapse storage

Definition at line 104 of file SynHandlerBase.cpp.

References vSetNumSynapses().

Referenced by SimpleSynHandler::initCinfo(), SeqSynHandler::initCinfo(), initCinfo(), STDPSynHandler::initCinfo(), and GraupnerBrunel2012CaPlasticitySynHandler::initCinfo().

105 {
106  vSetNumSynapses( num );
107 }
virtual void vSetNumSynapses(unsigned int num)=0

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual unsigned int SynHandlerBase::vGetNumSynapses ( ) const
pure virtual

Implemented in STDPSynHandler, SimpleSynHandler, GraupnerBrunel2012CaPlasticitySynHandler, and SeqSynHandler.

Referenced by getNumSynapses().

+ Here is the caller graph for this function:

virtual Synapse* SynHandlerBase::vGetSynapse ( unsigned int  i)
pure virtual

Implemented in STDPSynHandler, SimpleSynHandler, GraupnerBrunel2012CaPlasticitySynHandler, and SeqSynHandler.

Referenced by getSynapse().

+ Here is the caller graph for this function:

virtual void SynHandlerBase::vProcess ( const Eref e,
ProcPtr  p 
)
pure virtual

Implemented in STDPSynHandler, SimpleSynHandler, GraupnerBrunel2012CaPlasticitySynHandler, and SeqSynHandler.

Referenced by process().

+ Here is the caller graph for this function:

virtual void SynHandlerBase::vReinit ( const Eref e,
ProcPtr  p 
)
pure virtual

Implemented in STDPSynHandler, SimpleSynHandler, GraupnerBrunel2012CaPlasticitySynHandler, and SeqSynHandler.

Referenced by reinit().

+ Here is the caller graph for this function:

virtual void SynHandlerBase::vSetNumSynapses ( unsigned int  num)
pure virtual

Implemented in STDPSynHandler, SimpleSynHandler, GraupnerBrunel2012CaPlasticitySynHandler, and SeqSynHandler.

Referenced by setNumSynapses().

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: