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)). More...
 
 UniformUnitSphereDistribution ()
 Ctor. More...
 

Protected Attributes

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

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

Definition at line 164 of file Samplers.h.

Constructor & Destructor Documentation

◆ UniformUnitSphereDistribution()

Ctor.

Definition at line 170 of file Samplers.h.

Member Function Documentation

◆ operator()()

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.

Definition at line 186 of file Samplers.h.

Member Data Documentation

◆ normDist

std::normal_distribution<RealType> normDist
protected

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

Definition at line 209 of file Samplers.h.

◆ radDist

std::uniform_real_distribution<RealType> radDist
protected

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

Definition at line 213 of file Samplers.h.


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