12 #include "../builtins/Interpol2D.h"
24 "lookupA: Look up the A gate value from two doubles, passed"
25 "in as a vector. Uses linear interpolation in the 2D table"
26 "The range of the lookup doubles is predefined based on "
27 "knowledge of voltage or conc ranges, and the granularity "
28 "is specified by the xmin, xmax, and dx field, and their "
29 "y-axis counterparts.",
33 "lookupB: Look up B gate value from two doubles in a vector.",
50 "Minimum range for lookup",
56 "Minimum range for lookup",
62 "Divisions for lookup. Zero means to use linear interpolation",
67 "Minimum range for lookup",
72 "Minimum range for lookup",
77 "Divisions for lookup. Zero means to use linear interpolation",
82 "Minimum range for lookup",
88 "Minimum range for lookup",
94 "Divisions for lookup. Zero means to use linear interpolation",
100 "Minimum range for lookup",
105 "Minimum range for lookup",
110 "Divisions for lookup. Zero means to use linear interpolation",
117 static Finfo* HHGate2DFinfos[] =
137 static string doc[] =
140 "Author",
"Niraj Dudani, 2009, NCBS. Updated by Subhasis Ray, 2014, NCBS.",
141 "Description",
"HHGate2D: Gate for Hodkgin-Huxley type channels, equivalent to the "
142 "m and h terms on the Na squid channel and the n term on K. "
143 "This takes the voltage and state variable from the channel, "
144 "computes the new value of the state variable and a scaling, "
145 "depending on gate power, for the conductance. These two "
146 "terms are sent right back in a message to the channel.",
150 static Cinfo HHGate2DCinfo(
153 HHGate2DFinfos,
sizeof(HHGate2DFinfos)/
sizeof(
Finfo *),
156 sizeof(doc) /
sizeof(
string)
159 return &HHGate2DCinfo;
165 : originalChanId_(0),
171 originalChanId_( originalChanId ),
172 originalGateId_( originalGateId )
180 if ( v.size() < 2 ) {
181 cerr <<
"Error: HHGate2D::getAValue: 2 real numbers needed to lookup 2D table.\n";
185 if ( v.size() > 2 ) {
186 cerr <<
"Error: HHGate2D::getAValue: Only 2 real numbers needed to lookup 2D table. "
187 "Using only first 2.\n";
195 if ( v.size() < 2 ) {
196 cerr <<
"Error: HHGate2D::getAValue: 2 real numbers needed to lookup 2D table.\n";
200 if ( v.size() > 2 ) {
201 cerr <<
"Error: HHGate2D::getAValue: Only 2 real numbers needed to lookup 2D table. "
202 "Using only first 2.\n";
void setXminB(const Eref &e, double value)
Id originalChannelId() const
double getXminB(const Eref &e) const
void setXmin(double value)
bool isOriginalChannel(Id id) const
void setYdivs(unsigned int value)
void setXdivsA(const Eref &e, unsigned int value)
double getYminA(const Eref &e) const
void setTableA(const Eref &e, vector< vector< double > > value)
void setXmaxA(const Eref &e, double value)
void setYdivsA(const Eref &e, unsigned int value)
void setYdivsB(const Eref &e, unsigned int value)
unsigned int getYdivsB(const Eref &e) const
unsigned int getYdivsA(const Eref &e) const
void setYmaxB(const Eref &e, double value)
vector< vector< double > > getTableVector() const
void setXdivs(unsigned int value)
double getYmaxA(const Eref &e) const
unsigned int getXdivs() const
void setYminB(const Eref &e, double value)
static const Cinfo * hhGate2DCinfo
double getXmaxA(const Eref &e) const
void setTableVector(vector< vector< double > > value)
void setYminA(const Eref &e, double value)
static const double SINGULARITY
unsigned int getXdivsA(const Eref &e) const
void setYmaxA(const Eref &e, double value)
unsigned int getYdivs() const
void setYmax(double value)
double innerLookup(double x, double y) const
vector< vector< double > > getTableA(const Eref &e) const
double getXmaxB(const Eref &e) const
void setXmaxB(const Eref &e, double value)
double getYminB(const Eref &e) const
unsigned int getXdivsB(const Eref &e) const
double getXminA(const Eref &e) const
bool isOriginalGate(Id id) const
void setXminA(const Eref &e, double value)
void setXdivsB(const Eref &e, unsigned int value)
static const Cinfo * initCinfo()
vector< vector< double > > getTableB(const Eref &e) const
void lookupBoth(double v, double c, double *A, double *B) const
void setTableB(const Eref &e, vector< vector< double > > value)
static const Cinfo * initCinfo()
void setYmin(double value)
double lookupA(vector< double > v) const
void setXmax(double value)
double lookupB(vector< double > v) const
double getYmaxB(const Eref &e) const