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. More...
 
using GeneratorType = Generator
 Type of the stored generator. More...
 

Public Member Functions

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

Protected Attributes

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

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

Definition at line 47 of file Samplers.h.

Member Typedef Documentation

◆ DistributionType

using DistributionType = Distribution

Type of the stored distribution.

Definition at line 53 of file Samplers.h.

◆ GeneratorType

using GeneratorType = Generator

Type of the stored generator.

Definition at line 57 of file Samplers.h.

Constructor & Destructor Documentation

◆ Sampler()

Sampler ( Distribution &&  dist,
Generator &&  gen 
)
inline

Ctor.

Parameters
distThe distribution to store.
genThe generator to store.

Definition at line 73 of file Samplers.h.

Member Function Documentation

◆ getDistribution()

Distribution& getDistribution ( )
inline

Returns the stored distribution.

Returns
The stored distribution.

Definition at line 95 of file Samplers.h.

◆ getGenerator()

Generator& getGenerator ( )
inline

Returns the stored generator.

Returns
The stored generator.

Definition at line 104 of file Samplers.h.

◆ operator()()

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.

Definition at line 85 of file Samplers.h.

Member Data Documentation

◆ distribution

Distribution distribution
protected

The stored distribution.

Definition at line 62 of file Samplers.h.

◆ generator

Generator generator
protected

The stored generator.

Definition at line 66 of file Samplers.h.


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