NEST main@caf0ae8
 
Loading...
Searching...
No Matches
nest::UniformIntParameter Class Reference

Random parameter with uniform distribution in [0,max), yielding integer values. More...

#include <parameter.h>

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

Public Member Functions

 UniformIntParameter (const Dictionary &d)
 Creates a UniformIntParameter with specifications specified in a dictionary.
 
double value (RngPtr rng, Node *) override
 Generates a value based on parameter specifications and arguments.
 
virtual double value (RngPtr, Node *)
 Generates a value based on parameter specifications and arguments.
 
virtual double value (RngPtr rng, const std::vector< double > &source_pos, const std::vector< double > &target_pos, const AbstractLayer &layer, Node *node)
 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.
 

Private Attributes

long max_
 

Additional Inherited Members

- Protected Member Functions inherited from nest::Parameter
bool value_is_integer_ (const double value) const
 
- Protected Attributes inherited from nest::Parameter
bool is_spatial_ { false }
 
bool returns_int_only_ { false }
 

Detailed Description

Random parameter with uniform distribution in [0,max), yielding integer values.

Constructor & Destructor Documentation

◆ UniformIntParameter()

nest::UniformIntParameter::UniformIntParameter ( const Dictionary &  d)
inline

Creates a UniformIntParameter with specifications specified in a dictionary.

Parameters
ddictionary with parameter specifications

The dictionary can include the following entries: max - maximum value

References nest::names::max(), and max_.

Here is the call graph for this function:

Member Function Documentation

◆ value() [1/3]

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

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.

◆ value() [2/3]

double nest::UniformIntParameter::value ( RngPtr  ,
Node *   
)
inlineoverridevirtual

Generates a value based on parameter specifications and arguments.

Used when getting a parameter value based on random values or node attributes, like position. Note that not all parameters support all overloaded versions.

Parameters
rngpointer to the random number generator
nodepointer to the node, used when the node position is relevant
Returns
the value of the parameter.

Reimplemented from nest::Parameter.

References max_, and nest::BaseRandomGenerator::ulrand().

Here is the call graph for this function:

◆ value() [3/3]

virtual double nest::Parameter::value ( RngPtr  ,
Node *   
)
inlinevirtual

Generates a value based on parameter specifications and arguments.

Used when getting a parameter value based on random values or node attributes, like position. Note that not all parameters support all overloaded versions.

Parameters
rngpointer to the random number generator
nodepointer to the node, used when the node position is relevant
Returns
the value of the parameter.

Reimplemented from nest::Parameter.

Member Data Documentation

◆ max_

long nest::UniformIntParameter::max_
private

Referenced by UniformIntParameter(), and value().


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