The Conley-Morse Graphs Software
m_neuron1.h
Go to the documentation of this file.
1/////////////////////////////////////////////////////////////////////////////
2///
3/// @file m_neuron1.h
4///
5/// The nonlinear neuron model map.
6///
7/// This map defines the nonlinear Chialvo neuron model, based on the paper:
8/// Dante R. Chialvo. Generic excitable dynamics on a two-dimensional map.
9/// Chaos, Solitons & Fractals Vol. 5, Nos. 3/4, pp. 461-479, 1995.
10///
11/// @author Pawel Pilarczyk
12///
13/////////////////////////////////////////////////////////////////////////////
14
15// Copyright (C) 1997-2021 by Pawel Pilarczyk.
16//
17// This file is part of my research software package. This is free software:
18// you can redistribute it and/or modify it under the terms of the GNU
19// General Public License as published by the Free Software Foundation,
20// either version 3 of the License, or (at your option) any later version.
21//
22// This software is distributed in the hope that it will be useful,
23// but WITHOUT ANY WARRANTY; without even the implied warranty of
24// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25// GNU General Public License for more details.
26//
27// You should have received a copy of the GNU General Public License
28// along with this software; see the file "license.txt". If not,
29// please, see <https://www.gnu.org/licenses/>.
30
31// Started on February 9, 2008. Last revision: February 21, 2008.
32
33
34#ifndef _CMGRAPHS_NEURON1_H_
35#define _CMGRAPHS_NEURON1_H_
36
37
38// include local header files
39#include "maptype.h"
40#include "typeintv.h"
41
42// temporary - for debugging only
43#include "chomp/system/config.h"
44#include "chomp/system/textfile.h"
45
46// --------------------------------------------------
47// ---------- the Chialvo neuron model map ----------
48// --------------------------------------------------
49
50/// This class defines a map for the nonlinear Chialvo neuron model map.
51class MapNeuron1: public MapType
52{
53public:
54 /// The default constructor.
55 MapNeuron1 ();
56
57 /// Computes the image of a box whose left and right coordinates
58 /// are given. Fills in the images with the left and right
59 /// coordinates of the image box.
60 void compute (const double *xleft, const double *xright,
61 double *yleft, double *yright, int dim,
62 const spcCoord *coord, int subdiv) const;
63
64}; /* class MapNeuron1 */
65
66// --------------------------------------------------
67
69{
71 return;
72} /* MapNeuron1::MapNeuron1 */
73
74inline void MapNeuron1::compute (const double *xleft, const double *xright,
75 double *yleft, double *yright, int dim, const spcCoord *, int) const
76{
77 using chomp::homology::sbug;
78
79 if (dim != 2)
80 throw "Dimension 2 supported only.";
81
82 // create intervals that correspond to the point at the n-th iterate
83 IntervalType xn = IntervalType (xleft [0], xright [0]);
84 IntervalType yn = IntervalType (xleft [1], xright [1]);
85// sbug << "xn = " << xn << "\n";
86// sbug << "yn = " << yn << "\n";
87
88 // create intervals that correspond to the parameters of the system
93// sbug << "a = " << a << "\n";
94// sbug << "b = " << b << "\n";
95// sbug << "c = " << c << "\n";
96// sbug << "k = " << k << "\n";
97
98 // compute the point at the next iteration
99 IntervalType xn1 = sqr (xn) * exp (yn - xn) + k;
100 IntervalType yn1 = a * yn - b * xn + c;
101// sbug << "xn1 = " << xn1 << "\n";
102// sbug << "yn1 = " << yn1 << "\n";
103
104 // save the result
105 yleft [0] = xn1. leftBound ();
106 yright [0] = xn1. rightBound ();
107 yleft [1] = yn1. leftBound ();
108 yright [1] = yn1. rightBound ();
109
110 // swich the rounding direction to the neutral one
111 resetRounding ();
112 return;
113} /* MapNeuron1::compute */
114
115
116#endif // _CMGRAPHS_NEURON1_H_
117
This class defines a map for the nonlinear Chialvo neuron model map.
Definition: m_neuron1.h:52
void compute(const double *xleft, const double *xright, double *yleft, double *yright, int dim, const spcCoord *coord, int subdiv) const
Computes the image of a box whose left and right coordinates are given.
Definition: m_neuron1.h:74
MapNeuron1()
The default constructor.
Definition: m_neuron1.h:68
This is an abstract class which defines the interface to other classes that describe maps for the use...
Definition: maptype.h:59
const double & getLeftParam(int n) const
Returns the left value of the given parameter.
Definition: maptype.h:196
const double & getRightParam(int n) const
Returns the right value of the given parameter.
Definition: maptype.h:203
An abstract map type.
Data types for interval arithmetic.
void resetRounding()
This function resets rounding switches of the processor and sets rounding to the nearest.
Definition: typeintv.h:65
bool testIntervals(bool throwException=false)
Testing interval arithmetic.
Definition: typeintv.h:82
capd::DInterval IntervalType
The type of an interval (from the CAPD library 2.9/3.0 beta).
Definition: typeintv.h:49
int spcCoord
The type of coordinates of cubes in the phase space.
Definition: typespace.h:50