23 #ifndef CLIPPED_RANDOMDEV_H
24 #define CLIPPED_RANDOMDEV_H
84 template <
typename BaseRDV>
96 #if not defined(HAVE_XLC_ICE_ON_USING)
97 using RandomDev::operator();
115 template <
typename BaseRDV>
118 min_(-
std::numeric_limits<double>::infinity()),
119 max_(
std::numeric_limits<double>::infinity())
121 assert(not BaseRDV::has_ldev());
124 template <
typename BaseRDV>
127 min_(-
std::numeric_limits<double>::infinity()),
128 max_(
std::numeric_limits<double>::infinity())
130 assert(not BaseRDV::has_ldev());
133 template <
typename BaseRDV>
136 BaseRDV::set_status(d);
138 double new_min = min_;
139 double new_max = max_;
141 updateValue<double>(
d,
"low", new_min);
142 updateValue<double>(
d,
"high", new_max);
144 if ( new_min >= new_max )
151 template <
typename BaseRDV>
154 BaseRDV::get_status(d);
156 def<double>(
d,
"low", min_);
157 def<double>(
d,
"high", max_);
160 template <
typename BaseRDV>
164 return (*
this)(this->rng_);
167 template <
typename BaseRDV>
174 value = BaseRDV::operator()(r);
175 }
while ( value <= min_ || max_ <= value );
188 template <
typename BaseRDV>
204 #if not defined(HAVE_XLC_ICE_ON_USING)
205 using RandomDev::operator();
227 template <
typename BaseRDV>
230 min_(
std::numeric_limits<long>::
min()),
231 max_(
std::numeric_limits<long>::
max())
233 assert(BaseRDV::has_ldev());
236 template <
typename BaseRDV>
239 min_(
std::numeric_limits<long>::
min()),
240 max_(
std::numeric_limits<long>::
max())
242 assert(BaseRDV::has_ldev());
245 template <
typename BaseRDV>
248 BaseRDV::set_status(d);
253 updateValue<long>(
d,
"low", new_min);
254 updateValue<long>(
d,
"high", new_max);
256 if ( new_min >= new_max )
263 template <
typename BaseRDV>
266 BaseRDV::get_status(d);
268 def<long>(
d,
"low", min_);
269 def<long>(
d,
"high", max_);
272 template <
typename BaseRDV>
276 return (*
this)(this->rng_);
279 template <
typename BaseRDV>
286 value = BaseRDV::operator()(r);
287 }
while ( value < min_ || max_ < value );
292 template <
typename BaseRDV>
299 template <
typename BaseRDV>
306 value = BaseRDV::ldev(r);
307 }
while ( value < min_ || max_ < value );
324 template <
typename BaseRDV>
336 #if not defined(HAVE_XLC_ICE_ON_USING)
337 using RandomDev::operator();
355 template <
typename BaseRDV>
358 min_(-
std::numeric_limits<double>::infinity()),
359 max_(
std::numeric_limits<double>::infinity())
361 assert(not BaseRDV::has_ldev());
364 template <
typename BaseRDV>
367 min_(-
std::numeric_limits<double>::infinity()),
368 max_(
std::numeric_limits<double>::infinity())
370 assert(not BaseRDV::has_ldev());
373 template <
typename BaseRDV>
376 BaseRDV::set_status(d);
378 double new_min = min_;
379 double new_max = max_;
381 updateValue<double>(
d,
"low", new_min);
382 updateValue<double>(
d,
"high", new_max);
384 if ( new_min >= new_max )
391 template <
typename BaseRDV>
394 BaseRDV::get_status(d);
396 def<double>(
d,
"low", min_);
397 def<double>(
d,
"high", max_);
400 template <
typename BaseRDV>
404 return (*
this)(this->rng_);
407 template <
typename BaseRDV>
411 const double value = BaseRDV::operator()(r);
431 template <
typename BaseRDV>
447 #if not defined(HAVE_XLC_ICE_ON_USING)
448 using RandomDev::operator();
470 template <
typename BaseRDV>
473 min_(
std::numeric_limits<long>::
min()),
474 max_(
std::numeric_limits<long>::
max())
476 assert(BaseRDV::has_ldev());
479 template <
typename BaseRDV>
482 min_(
std::numeric_limits<long>::
min()),
483 max_(
std::numeric_limits<long>::
max())
485 assert(BaseRDV::has_ldev());
488 template <
typename BaseRDV>
491 BaseRDV::set_status(d);
496 updateValue<long>(
d,
"low", new_min);
497 updateValue<long>(
d,
"high", new_max);
499 if ( new_min >= new_max )
506 template <
typename BaseRDV>
509 BaseRDV::get_status(d);
511 def<long>(
d,
"low", min_);
512 def<long>(
d,
"high", max_);
515 template <
typename BaseRDV>
519 return (*
this)(this->rng_);
522 template <
typename BaseRDV>
526 const double value = BaseRDV::operator()(r);
534 template <
typename BaseRDV>
541 template <
typename BaseRDV>
545 const long value = BaseRDV::ldev(r);
Exception to be thrown if a parameter value is not acceptable.
Definition: sliexceptions.h:220
void set_status(const DictionaryDatum &)
set distribution parameters from SLI dict
Definition: clipped_randomdev.h:134
void get_status(DictionaryDatum &) const
get distribution parameters from SLI dict
Definition: clipped_randomdev.h:264
const Name d("d")
Specific to Izhikevich 2003.
Definition: nest_names.h:83
void set_status(const DictionaryDatum &)
set distribution parameters from SLI dict
Definition: clipped_randomdev.h:489
ClippedToBoundaryDiscreteRandomDev()
Definition: clipped_randomdev.h:480
Wrapper template turning any discrete RDV into a clipped RDV.
Definition: clipped_randomdev.h:189
void set_status(const DictionaryDatum &)
set distribution parameters from SLI dict
Definition: clipped_randomdev.h:246
ClippedToBoundaryContinuousRandomDev()
Definition: clipped_randomdev.h:365
double operator()(void)
Definition: clipped_randomdev.h:274
double max_
upper bound
Definition: clipped_randomdev.h:351
long max_
largest value
Definition: clipped_randomdev.h:467
double operator()(void)
Definition: clipped_randomdev.h:402
ClippedRedrawContinuousRandomDev()
Definition: clipped_randomdev.h:125
void get_status(DictionaryDatum &) const
get distribution parameters from SLI dict
Definition: clipped_randomdev.h:507
Wrapper template turning any continuous RDV into a clipped-to-boundary RDV.
Definition: clipped_randomdev.h:325
double max_
upper bound
Definition: clipped_randomdev.h:111
const Name std("std")
Miscellaneous parameters.
Definition: nest_names.h:265
void get_status(DictionaryDatum &) const
get distribution parameters from SLI dict
Definition: clipped_randomdev.h:152
double operator()(void)
Definition: clipped_randomdev.h:517
ClippedRedrawDiscreteRandomDev()
Definition: clipped_randomdev.h:237
Wrapper template turning any discrete RDV into a clipped-to-boundary RDV.
Definition: clipped_randomdev.h:432
double operator()(void)
Definition: clipped_randomdev.h:162
long min_
smallest value
Definition: clipped_randomdev.h:466
void get_status(DictionaryDatum &) const
get distribution parameters from SLI dict
Definition: clipped_randomdev.h:392
long min_
smallest value
Definition: clipped_randomdev.h:223
const Name min("min")
Definition: topology_names.h:74
Wrapper template turning any continuous RDV into a clipped RDV.
Definition: clipped_randomdev.h:85
const Name max("max")
Definition: topology_names.h:75
long ldev(void)
Definition: clipped_randomdev.h:294
virtual long ldev(void)
integer valued functions for discrete distributions
Definition: randomdev.h:206
long max_
largest value
Definition: clipped_randomdev.h:224
long ldev(void)
Definition: clipped_randomdev.h:536
double min_
lower bound
Definition: clipped_randomdev.h:350
double min_
lower bound
Definition: clipped_randomdev.h:110
void set_status(const DictionaryDatum &)
set distribution parameters from SLI dict
Definition: clipped_randomdev.h:374