UniformUnitSphereDistribution< RealType > Class Template Reference

Uniform distribution over the volume (closed set) of an n dimensional unit sphere. More...

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

Public Member Functions

template<class Iterator, class Generator>
void operator() (const Iterator &first, const Iterator &last, Generator &gen)
 Fills [first, last) with a uniform sample of n dimensional unit sphere's volume (n = distance(first, last)).
 
 UniformUnitSphereDistribution ()
 Ctor.
 

Protected Attributes

std::normal_distribution< RealType > normDist
 The internal used normal distribution for samples of the sphere surfaces.
 
std::uniform_real_distribution< RealType > radDist
 The uniform distribution used to transform sphere surface samples to samples in the sphere.
 

Detailed Description

template<class RealType>
class armarx::UniformUnitSphereDistribution< RealType >

Uniform distribution over the volume (closed set) of an n dimensional unit sphere.

https://math.stackexchange.com/questions/87230/picking-random-points-in-the-volume-of-sphere-with-uniform-probability/87238#87238

Constructor & Destructor Documentation

◆ UniformUnitSphereDistribution()

template<class RealType>
UniformUnitSphereDistribution ( )
inline

Ctor.

Member Function Documentation

◆ operator()()

template<class RealType>
template<class Iterator, class Generator>
void operator() ( const Iterator & first,
const Iterator & last,
Generator & gen )
inline

Fills [first, last) with a uniform sample of n dimensional unit sphere's volume (n = distance(first, last)).

Parameters
first
last
gen
firstThe first value to fill.
lastOne past the last value to fill.
genThe generator to use.

Member Data Documentation

◆ normDist

template<class RealType>
std::normal_distribution<RealType> normDist
protected

The internal used normal distribution for samples of the sphere surfaces.

◆ radDist

template<class RealType>
std::uniform_real_distribution<RealType> radDist
protected

The uniform distribution used to transform sphere surface samples to samples in the sphere.


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