Sampler< Distribution, Generator > Class Template Reference

Stores a distribution and a generator. More...

#include <RobotComponents/components/MotionPlanning/util/Samplers.h>

Public Types

using DistributionType = Distribution
 Type of the stored distribution.
 
using GeneratorType = Generator
 Type of the stored generator.
 

Public Member Functions

Distribution & getDistribution ()
 Returns the stored distribution.
 
Generator & getGenerator ()
 Returns the stored generator.
 
template<class... Args>
auto operator() (Args &&... args) -> decltype(distribution(std::forward< Args >(args)..., generator))
 Passes all arguments followed by the generator to the distribution.
 
 Sampler (Distribution &&dist, Generator &&gen)
 Ctor.
 

Protected Attributes

Distribution distribution
 The stored distribution.
 
Generator generator
 The stored generator.
 

Detailed Description

template<class Distribution, class Generator>
class armarx::Sampler< Distribution, Generator >

Stores a distribution and a generator.

The call operator passes the generator to the distribution

Member Typedef Documentation

◆ DistributionType

template<class Distribution, class Generator>
using DistributionType = Distribution

Type of the stored distribution.

◆ GeneratorType

template<class Distribution, class Generator>
using GeneratorType = Generator

Type of the stored generator.

Constructor & Destructor Documentation

◆ Sampler()

template<class Distribution, class Generator>
Sampler ( Distribution && dist,
Generator && gen )
inline

Ctor.

Parameters
distThe distribution to store.
genThe generator to store.

Member Function Documentation

◆ getDistribution()

template<class Distribution, class Generator>
Distribution & getDistribution ( )
inline

Returns the stored distribution.

Returns
The stored distribution.

◆ getGenerator()

template<class Distribution, class Generator>
Generator & getGenerator ( )
inline

Returns the stored generator.

Returns
The stored generator.

◆ operator()()

template<class Distribution, class Generator>
template<class... Args>
auto operator() ( Args &&... args) -> decltype(distribution(std::forward<Args>(args)..., generator))
inline

Passes all arguments followed by the generator to the distribution.

Parameters
argsAdditional parameters to pass to the distribution.
Returns
The return value of the distribution.

Member Data Documentation

◆ distribution

template<class Distribution, class Generator>
Distribution distribution
protected

The stored distribution.

◆ generator

template<class Distribution, class Generator>
Generator generator
protected

The stored generator.


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