NEST main@f146f75
Loading...
Searching...
No Matches
nest::RedrawParameter Class Reference

Parameter class redrawing a parameter value if it is outside of specified limits. More...

#include <parameter.h>

Inheritance diagram for nest::RedrawParameter:
[legend]
Collaboration diagram for nest::RedrawParameter:
[legend]

Public Member Functions

 RedrawParameter (ParameterPTR p, const double min, const double max)
 Construct a redrawing parameter.
 RedrawParameter (const RedrawParameter &p)
double value (RngPtr rng, Node *node) override
double value (RngPtr rng, const std::vector< double > &source_pos, const std::vector< double > &target_pos, const AbstractLayer &layer, Node *node) override
 Generates a value based on parameter specifications and arguments.
Public Member Functions inherited from nest::Parameter
 Parameter (bool is_spatial=false, bool returns_int_only=false)
 Creates a Parameter, with optionally specified attributes.
 Parameter (const Parameter &p)=default
virtual ~Parameter ()=default
std::vector< double > apply (const NodeCollectionPTR &, const std::vector< std::vector< double > > &)
 Applies a parameter on a single-node ID NodeCollection and given array of positions.
bool is_spatial () const
 Check if the Parameter is based on spatial properties.
bool returns_int_only () const
 Check if the Parameter only returns integer values.

Protected Attributes

ParameterPTR const p_
double min_
double max_
const size_t max_redraws_
Protected Attributes inherited from nest::Parameter
bool is_spatial_ { false }
bool returns_int_only_ { false }

Additional Inherited Members

Protected Member Functions inherited from nest::Parameter
bool value_is_integer_ (const double value) const

Detailed Description

Parameter class redrawing a parameter value if it is outside of specified limits.

Constructor & Destructor Documentation

◆ RedrawParameter() [1/2]

nest::RedrawParameter::RedrawParameter ( ParameterPTR p,
const double min,
const double max )

Construct a redrawing parameter.

A copy is made of the supplied Parameter object.

References nest::Parameter::is_spatial(), max_, max_redraws_, min_, p_, and nest::Parameter::Parameter().

Referenced by RedrawParameter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RedrawParameter() [2/2]

nest::RedrawParameter::RedrawParameter ( const RedrawParameter & p)
inline

References max_, max_redraws_, min_, p_, nest::Parameter::Parameter(), and RedrawParameter().

Here is the call graph for this function:

Member Function Documentation

◆ value() [1/2]

double nest::RedrawParameter::value ( RngPtr rng,
const std::vector< double > & source_pos,
const std::vector< double > & target_pos,
const AbstractLayer & layer,
Node * node )
overridevirtual

Generates a value based on parameter specifications and arguments.

Used when connecting spatial nodes. Note that not all parameters support all overloaded versions.

Parameters
rngpointer to the random number generator
source_posposition of the source node
target_posposition of the target node
layerspatial layer
nodetarget node, required for normal and lognormal parameters
Returns
the value of the parameter.

Reimplemented from nest::Parameter.

References max_, max_redraws_, p_, and value().

Here is the call graph for this function:

◆ value() [2/2]

double nest::RedrawParameter::value ( RngPtr rng,
Node * node )
overridevirtual
Returns
the value of the parameter.

Reimplemented from nest::Parameter.

References max_, max_redraws_, p_, and value().

Referenced by value(), and value().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ max_

double nest::RedrawParameter::max_
protected

◆ max_redraws_

const size_t nest::RedrawParameter::max_redraws_
protected

◆ min_

double nest::RedrawParameter::min_
protected

Referenced by RedrawParameter(), and RedrawParameter().

◆ p_

ParameterPTR const nest::RedrawParameter::p_
protected

The documentation for this class was generated from the following files: