forked from UWB-Biocomputing/BrainGrid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSInputRegular.h
82 lines (64 loc) · 2.04 KB
/
SInputRegular.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/**
* @file SInputRegular.h
*
* @brief A class that performs stimulus input (implementation Regular).
*/
/**
**
** \class SInputRegular SInputRegular.h "SInputRegular.h"
**
** \latexonly \subsubsection*{Implementation} \endlatexonly
** \htmlonly <h3>Implementation</h3> \endhtmlonly
**
** The SInputRegular performs providing stimulus input to the network for each time step.
** Inputs are series of current pulses, which are characterized by a duration, an interval
** and input values.
**
** This class is the base class of GpuSInputRegular and HostSInputRegular.
**
** \latexonly \subsubsection*{Credits} \endlatexonly
** \htmlonly <h3>Credits</h3> \endhtmlonly
**
** Some models in this simulator is a rewrite of CSIM (2006) and other
** work (Stiber and Kawasaki (2007?))
**
**
** @author Fumitaka Kawasaki
**/
#pragma once
#ifndef _SINPUTREGULAR_H_
#define _SINPUTREGULAR_H_
#include "ISInput.h"
class SInputRegular : public ISInput
{
public:
//! The constructor for SInputRegular.
SInputRegular(SimulationInfo* psi, TiXmlElement* parms);
~SInputRegular();
//! Initialize data.
virtual void init(SimulationInfo* psi);
//! Terminate process.
virtual void term(SimulationInfo* psi);
protected:
//! True if stimuls input is on.
bool fSInput;
//! Duration of a pulse in second.
BGFLOAT duration;
//! Interval between pulses in second.
BGFLOAT interval;
//! The number of time steps for one cycle of a stimulation
int nStepsCycle;
//! The time step within a cycle of stimulation
int nStepsInCycle;
//! The number of time steps for duration of a pulse.
int nStepsDuration;
//! The number of time steps for interval between pulses.
int nStepsInterval;
//! Initial input values
vector<BGFLOAT> initValues;
//! Input values, where each entry corresponds with a summationPoint.
BGFLOAT *values;
//! Shift values, which determin the synch of stimuli (all 0 when synchronous)
int *nShiftValues;
};
#endif // _SINPUTREGULAR_H_