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

Node position parameter. More...

#include <parameter.h>

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

Public Member Functions

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

Private Member Functions

double get_node_pos_ (Node *node) const
 

Private Attributes

long dimension_
 
int synaptic_endpoint_
 

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

Node position parameter.

Constructor & Destructor Documentation

◆ NodePosParameter()

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

Creates a NodePosParameter with specifications specified in a dictionary.

Parameters
ddictionary with parameter specifications

The dictionary can include the following entries: dimension - Dimension from which to get the position value of the node. 0: x, 1: y, 2: z. synaptic_endpoint - If specified, specifies if the position should be taken from the presynaptic or postsynaptic node in a connection. 0: unspecified, 1: presynaptic, 2: postsynaptic.

References nest::names::dimension(), dimension_, nest::names::synaptic_endpoint(), and synaptic_endpoint_.

Here is the call graph for this function:

Member Function Documentation

◆ get_node_pos_()

double nest::NodePosParameter::get_node_pos_ ( Node *  node) const
private

References dimension_, nest::Node::get_node_id(), nest::kernel(), nest::NodeManager::node_id_to_node_collection(), and nest::KernelManager::node_manager.

Referenced by value().

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

◆ value() [1/2]

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

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 dimension_, and synaptic_endpoint_.

◆ value() [2/2]

double nest::NodePosParameter::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 get_node_pos_(), and synaptic_endpoint_.

Here is the call graph for this function:

Member Data Documentation

◆ dimension_

long nest::NodePosParameter::dimension_
private

◆ synaptic_endpoint_

int nest::NodePosParameter::synaptic_endpoint_
private

Referenced by NodePosParameter(), value(), and value().


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