forked from Conedy/Conedy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mapNode.cpp
44 lines (28 loc) · 866 Bytes
/
mapNode.cpp
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
#include "mapNode.h"
#include "gslNoise.h"
namespace conedy {
void izhikevichMap::operator()(baseType xprime [], baseType x[])
{
if (x[0] < -100) {
x[0] = -100;
}
if (x[0] > 30)
{
registerOneTimeCallBack(_fire_, dynNode::time + timeDelay() );
// decreaseKey (_fire_, time + timeDelay());
x[0] = c();
x[1] = x[1] + d();
}
if (gslNoise::getUniform() < pendo())
{
xprime[0] = x[0] + 0.5 *(0.04 * x[0]*x[0] + 5 * x[0] + 140 - x[1] + I() + pendoC() );
xprime[0] = xprime[0] + 0.5 *(0.04 * xprime[0]*xprime[0] + 5 * xprime[0] + 140 - x[1] + I() + pendoC()) ;
}
else
{
xprime[0] = x[0] + 0.5*(0.04 * x[0]*x[0] + 5 * x[0] + 140 - x[1] + I() );
xprime[0] = xprime[0] + 0.5*(0.04 * xprime[0]*xprime[0] + 5 * xprime[0] + 140 - x[1] + I() );
}
xprime[1] = x[1] + a() * (b() * x[0] - x[1]);
}
}