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

#include <IntFire.h>

+ Collaboration diagram for IntFire:

Public Member Functions

void activation (double v)
 
double getRefractoryPeriod () const
 
double getTau () const
 
double getThresh () const
 
double getVm () const
 
void innerAddSpike (unsigned int synIndex, double time)
 
 IntFire ()
 
 IntFire (double thresh, double tau)
 
void process (const Eref &e, ProcPtr p)
 
void reinit (const Eref &e, ProcPtr p)
 
void setRefractoryPeriod (double v)
 
void setTau (double v)
 
void setThresh (double v)
 
void setVm (double v)
 

Static Public Member Functions

static const CinfoinitCinfo ()
 

Private Attributes

double activation_
 
double lastSpike_
 
double refractoryPeriod_
 
double tau_
 
double thresh_
 
double Vm_
 

Friends

void testStandaloneIntFire ()
 
void testSynapse ()
 

Detailed Description

Definition at line 14 of file IntFire.h.

Constructor & Destructor Documentation

IntFire::IntFire ( )

Definition at line 103 of file IntFire.cpp.

104  : Vm_( 0.0 ), thresh_( 0.0 ), tau_( 1.0 ),
105  refractoryPeriod_( 0.1 ), lastSpike_( -0.1 ),
106  activation_( 0.0 )
107 {
108  ;
109 }
double refractoryPeriod_
Definition: IntFire.h:53
double lastSpike_
Definition: IntFire.h:54
double activation_
Definition: IntFire.h:55
double Vm_
Definition: IntFire.h:50
double tau_
Definition: IntFire.h:52
double thresh_
Definition: IntFire.h:51
IntFire::IntFire ( double  thresh,
double  tau 
)

Definition at line 111 of file IntFire.cpp.

112  : Vm_( 0.0 ), thresh_( thresh ), tau_( tau ), refractoryPeriod_( 0.1 ), lastSpike_( -1.0 ), activation_( 0.0 )
113 {
114  ;
115 }
double refractoryPeriod_
Definition: IntFire.h:53
double lastSpike_
Definition: IntFire.h:54
double activation_
Definition: IntFire.h:55
double Vm_
Definition: IntFire.h:50
double tau_
Definition: IntFire.h:52
double thresh_
Definition: IntFire.h:51

Member Function Documentation

void IntFire::activation ( double  v)

Definition at line 182 of file IntFire.cpp.

References activation_.

Referenced by initCinfo().

183 {
184  activation_ += v;
185 }
double activation_
Definition: IntFire.h:55

+ Here is the caller graph for this function:

double IntFire::getRefractoryPeriod ( ) const

Definition at line 177 of file IntFire.cpp.

References refractoryPeriod_.

Referenced by initCinfo().

178 {
179  return refractoryPeriod_;
180 }
double refractoryPeriod_
Definition: IntFire.h:53

+ Here is the caller graph for this function:

double IntFire::getTau ( ) const

Definition at line 167 of file IntFire.cpp.

References tau_.

Referenced by initCinfo().

168 {
169  return tau_;
170 }
double tau_
Definition: IntFire.h:52

+ Here is the caller graph for this function:

double IntFire::getThresh ( ) const

Definition at line 172 of file IntFire.cpp.

References thresh_.

Referenced by initCinfo().

173 {
174  return thresh_;
175 }
double thresh_
Definition: IntFire.h:51

+ Here is the caller graph for this function:

double IntFire::getVm ( ) const

Definition at line 162 of file IntFire.cpp.

References Vm_.

Referenced by initCinfo().

163 {
164  return Vm_;
165 }
double Vm_
Definition: IntFire.h:50

+ Here is the caller graph for this function:

const Cinfo * IntFire::initCinfo ( )
static

Definition at line 23 of file IntFire.cpp.

References activation(), getRefractoryPeriod(), getTau(), getThresh(), getVm(), Neutral::initCinfo(), intFireCinfo, process(), reinit(), setRefractoryPeriod(), setTau(), setThresh(), setVm(), and spikeOut().

Referenced by testCinfoFields(), testFinfoFields(), testSendSpike(), testSetGetDouble(), and testSparseMsg().

24 {
26  // Field Definitions
29  "Vm",
30  "Membrane potential",
33  );
34 
36  "tau",
37  "charging time-course",
40  );
41 
42  static ValueFinfo< IntFire, double > thresh(
43  "thresh",
44  "firing threshold",
47  );
48 
49  static ValueFinfo< IntFire, double > refractoryPeriod(
50  "refractoryPeriod",
51  "Minimum time between successive spikes",
54  );
56  // MsgDest Definitions
58  static DestFinfo activation( "activation",
59  "Handles value of synaptic activation arriving on this IntFire",
61 
62  static DestFinfo process( "process",
63  "Handles process call",
65  static DestFinfo reinit( "reinit",
66  "Handles reinit call",
69  // SharedFinfo Definitions
71  static Finfo* procShared[] = {
72  &process, &reinit
73  };
74  static SharedFinfo proc( "proc",
75  "Shared message for process and reinit",
76  procShared, sizeof( procShared ) / sizeof( const Finfo* )
77  );
78 
79  static Finfo* intFireFinfos[] = {
80  &Vm, // Value
81  &tau, // Value
82  &thresh, // Value
83  &refractoryPeriod, // Value
84  &activation, // DestFinfo
85  &proc, // SharedFinfo
86  spikeOut(), // MsgSrc
87  };
88 
89  static Dinfo< IntFire > dinfo;
90  static Cinfo intFireCinfo (
91  "IntFire",
93  intFireFinfos,
94  sizeof( intFireFinfos ) / sizeof ( Finfo* ),
95  &dinfo
96  );
97 
98  return &intFireCinfo;
99 }
double getRefractoryPeriod() const
Definition: IntFire.cpp:177
void setVm(double v)
Definition: IntFire.cpp:141
void process(const Eref &e, ProcPtr p)
Definition: IntFire.cpp:117
double getThresh() const
Definition: IntFire.cpp:172
void setTau(double v)
Definition: IntFire.cpp:146
void setRefractoryPeriod(double v)
Definition: IntFire.cpp:156
Definition: Dinfo.h:60
void setThresh(double v)
Definition: IntFire.cpp:151
static SrcFinfo1< double > * spikeOut()
Definition: IntFire.cpp:14
double getTau() const
Definition: IntFire.cpp:167
void activation(double v)
Definition: IntFire.cpp:182
Definition: OpFunc.h:27
double getVm() const
Definition: IntFire.cpp:162
void reinit(const Eref &e, ProcPtr p)
Definition: IntFire.cpp:135
static const Cinfo * intFireCinfo
Definition: IntFire.cpp:101
static const Cinfo * initCinfo()
Definition: Neutral.cpp:16
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 IntFire::innerAddSpike ( unsigned int  synIndex,
double  time 
)

Overrides base class function. Inserts an event into the pendingEvents queue for spikes.

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

Definition at line 117 of file IntFire.cpp.

References activation_, ProcInfo::currTime, Eref::dataIndex(), ProcInfo::dt, lastSpike_, refractoryPeriod_, spikeOut(), tau_, thresh_, and Vm_.

Referenced by initCinfo().

118 {
119  static bool report = false;
120  static unsigned int reportIndex = 0;
121  if ( report && e.dataIndex() == reportIndex )
122  cout << " " << p->currTime << "," << Vm_;
123  Vm_ += activation_;
124  activation_ = 0.0;
125 
126  if ( Vm_ > thresh_ && (p->currTime - lastSpike_) > refractoryPeriod_ ) {
127  spikeOut()->send( e, p->currTime );
128  Vm_ = -1.0e-7;
129  lastSpike_ = p->currTime;
130  } else {
131  Vm_ *= ( 1.0 - p->dt / tau_ );
132  }
133 }
double currTime
Definition: ProcInfo.h:19
unsigned int dataIndex() const
Definition: Eref.h:50
double refractoryPeriod_
Definition: IntFire.h:53
static SrcFinfo1< double > * spikeOut()
Definition: IntFire.cpp:14
double lastSpike_
Definition: IntFire.h:54
double dt
Definition: ProcInfo.h:18
double activation_
Definition: IntFire.h:55
double Vm_
Definition: IntFire.h:50
double tau_
Definition: IntFire.h:52
double thresh_
Definition: IntFire.h:51

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 135 of file IntFire.cpp.

References activation_, and Vm_.

Referenced by initCinfo().

136 {
137  Vm_ = 0.0;
138  activation_ = 0.0;
139 }
double activation_
Definition: IntFire.h:55
double Vm_
Definition: IntFire.h:50

+ Here is the caller graph for this function:

void IntFire::setRefractoryPeriod ( double  v)

Definition at line 156 of file IntFire.cpp.

References lastSpike_, and refractoryPeriod_.

Referenced by initCinfo().

157 {
158  refractoryPeriod_ = v;
159  lastSpike_ = -v;
160 }
double refractoryPeriod_
Definition: IntFire.h:53
double lastSpike_
Definition: IntFire.h:54

+ Here is the caller graph for this function:

void IntFire::setTau ( double  v)

Definition at line 146 of file IntFire.cpp.

References tau_.

Referenced by initCinfo().

147 {
148  tau_ = v;
149 }
double tau_
Definition: IntFire.h:52

+ Here is the caller graph for this function:

void IntFire::setThresh ( double  v)

Definition at line 151 of file IntFire.cpp.

References thresh_.

Referenced by initCinfo().

152 {
153  thresh_ = v;
154 }
double thresh_
Definition: IntFire.h:51

+ Here is the caller graph for this function:

void IntFire::setVm ( double  v)

Definition at line 141 of file IntFire.cpp.

References Vm_.

Referenced by initCinfo().

142 {
143  Vm_ = v;
144 }
double Vm_
Definition: IntFire.h:50

+ Here is the caller graph for this function:

Friends And Related Function Documentation

void testStandaloneIntFire ( )
friend
void testSynapse ( )
friend

Definition at line 205 of file testSynapse.cpp.

206 {
207 #ifdef DO_UNIT_TESTS
208  testRollingMatrix();
209  testRollingMatrix2();
210  testSeqSynapse();
211 #endif // DO_UNIT_TESTS
212 }

Member Data Documentation

double IntFire::activation_
private

Definition at line 55 of file IntFire.h.

Referenced by activation(), process(), and reinit().

double IntFire::lastSpike_
private

Definition at line 54 of file IntFire.h.

Referenced by process(), and setRefractoryPeriod().

double IntFire::refractoryPeriod_
private

Definition at line 53 of file IntFire.h.

Referenced by getRefractoryPeriod(), process(), and setRefractoryPeriod().

double IntFire::tau_
private

Definition at line 52 of file IntFire.h.

Referenced by getTau(), process(), and setTau().

double IntFire::thresh_
private

Definition at line 51 of file IntFire.h.

Referenced by getThresh(), process(), and setThresh().

double IntFire::Vm_
private

Definition at line 50 of file IntFire.h.

Referenced by getVm(), process(), reinit(), and setVm().


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