NEST main@caf0ae8
 
Loading...
Searching...
No Matches
nest::RandomDistribution< DistributionT > Class Template Reference

Wrapper for distributions. More...

#include <random_generators.h>

Inheritance diagram for nest::RandomDistribution< DistributionT >:
[legend]

Public Types

using result_type = typename DistributionT::result_type
 
using param_type = typename DistributionT::param_type
 

Public Member Functions

 RandomDistribution ()=default
 Constructs a distribution object with its default parameters.
 
 ~RandomDistribution ()=default
 
result_type operator() (RngPtr g)
 Generating function.
 
result_type operator() (RngPtr g, param_type &params)
 Generating function.
 
void param (const param_type &params)
 Sets the distribution's associated parameter set to params.
 
result_type min () const
 Returns the minimum value potentially generated by the distribution.
 
result_type max () const
 Returns the maximum value potentially generated by the distribution.
 

Private Attributes

DistributionT distribution_
 Wrapped RandomDistribution.
 

Detailed Description

template<typename DistributionT>
class nest::RandomDistribution< DistributionT >

Wrapper for distributions.

The result_type of the distribution must be unsigned long or double.

Template Parameters
DistributionTType of the wrapped RandomDistribution.

Member Typedef Documentation

◆ param_type

template<typename DistributionT >
using nest::RandomDistribution< DistributionT >::param_type = typename DistributionT::param_type

◆ result_type

template<typename DistributionT >
using nest::RandomDistribution< DistributionT >::result_type = typename DistributionT::result_type

Constructor & Destructor Documentation

◆ RandomDistribution()

template<typename DistributionT >
nest::RandomDistribution< DistributionT >::RandomDistribution ( )
default

Constructs a distribution object with its default parameters.

◆ ~RandomDistribution()

template<typename DistributionT >
nest::RandomDistribution< DistributionT >::~RandomDistribution ( )
default

Member Function Documentation

◆ max()

template<typename DistributionT >
result_type nest::RandomDistribution< DistributionT >::max ( ) const
inline

Returns the maximum value potentially generated by the distribution.

References nest::RandomDistribution< DistributionT >::distribution_.

◆ min()

template<typename DistributionT >
result_type nest::RandomDistribution< DistributionT >::min ( ) const
inline

Returns the minimum value potentially generated by the distribution.

References nest::RandomDistribution< DistributionT >::distribution_.

◆ operator()() [1/2]

template<typename DistributionT >
result_type nest::RandomDistribution< DistributionT >::operator() ( RngPtr  g)
inline

Generating function.

This function just flips the call, to call the RNG wrapper with the distribution. This is done so that the native C++ distribution can be called with the native C++ generator.

Parameters
gPointer to the RNG wrapper.

References nest::RandomDistribution< DistributionT >::distribution_.

◆ operator()() [2/2]

template<typename DistributionT >
result_type nest::RandomDistribution< DistributionT >::operator() ( RngPtr  g,
param_type &  params 
)
inline

Generating function.

This function just flips the call, to call the RNG wrapper with the distribution. This is done so that the native C++ distribution can be called with the native C++ generator.

Parameters
gPointer to the RNG wrapper.
paramsDistribution parameter set to use.

References nest::RandomDistribution< DistributionT >::distribution_.

◆ param()

template<typename DistributionT >
void nest::RandomDistribution< DistributionT >::param ( const param_type &  params)
inline

Sets the distribution's associated parameter set to params.

Parameters
paramsNew contents of the distribution's associated parameter set.

References nest::RandomDistribution< DistributionT >::distribution_.

Referenced by nest::ConnectionCreator::fixed_indegree_(), nest::ConnectionCreator::fixed_outdegree_(), nest::LognormalParameter::LognormalParameter(), nest::NormalParameter::NormalParameter(), nest::mip_generator::pre_run_hook(), nest::poisson_generator::pre_run_hook(), and nest::pp_psc_delta::pre_run_hook().

Here is the caller graph for this function:

Member Data Documentation

◆ distribution_


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