UniformCuboidDistribution< RealType > Class Template Reference

Uniform distribution of an cuboid space. More...

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

Public Types

using BoundsType = std::pair<RealType, RealType>
 Type to pass the bounds of a dimension.
 

Public Member Functions

template<class T = std::size_t>
T getDimensionality () const
 Returns the cuboid's dimensionality.
 
RealType getVolume () const
 Returns the cuboid's volume.
 
template<class Iterator>
bool isInBounds (Iterator first)
 Returns whether the range [first, first + dimensionality) is a point contained by the cuboid.
 
template<class Iterator, class Generator>
void operator() (Iterator first, Generator &gen)
 Fills the range [first, first + dimensionality) with an uniform sample of the cuboid.
 
template<class Iterator>
 UniformCuboidDistribution (Iterator boundsFirst, Iterator boundsLast)
 Constructs a cuboid distribution with the bounds [boundsFirst, boundsLast).
 

Protected Attributes

std::vector< std::uniform_real_distribution< RealType > > spaceDist
 Distributions for the dimensions of the cuboid.
 
RealType volume
 The cuboid's volume.
 

Detailed Description

template<class RealType>
class armarx::UniformCuboidDistribution< RealType >

Uniform distribution of an cuboid space.

Member Typedef Documentation

◆ BoundsType

template<class RealType>
using BoundsType = std::pair<RealType, RealType>

Type to pass the bounds of a dimension.

Constructor & Destructor Documentation

◆ UniformCuboidDistribution()

template<class RealType>
template<class Iterator>
UniformCuboidDistribution ( Iterator boundsFirst,
Iterator boundsLast )
inline

Constructs a cuboid distribution with the bounds [boundsFirst, boundsLast).

bounds.first is used as lower and bounds.second as upper bound.

Parameters
boundsFirstThe bounds for the first dimension.
boundsLastOne past the bounds for the last dimension.

Member Function Documentation

◆ getDimensionality()

template<class RealType>
template<class T = std::size_t>
T getDimensionality ( ) const
inline

Returns the cuboid's dimensionality.

Returns
The cuboid's dimensionality.

◆ getVolume()

template<class RealType>
RealType getVolume ( ) const
inline

Returns the cuboid's volume.

Returns
The cuboid's volume.

◆ isInBounds()

template<class RealType>
template<class Iterator>
bool isInBounds ( Iterator first)
inline

Returns whether the range [first, first + dimensionality) is a point contained by the cuboid.

[first, first + dimensionality) has to be a valid range. If not the behavior is undefined.

Parameters
firstThe first value of the point.
Returns
Whether the point is contained by the cuboid.

◆ operator()()

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

Fills the range [first, first + dimensionality) with an uniform sample of the cuboid.

[first, first + dimensionality) has to be a valid range. If not the behavior is undefined.

Parameters
firstThe first value to fill.
genThe used generator.

Member Data Documentation

◆ spaceDist

template<class RealType>
std::vector<std::uniform_real_distribution<RealType> > spaceDist
protected

Distributions for the dimensions of the cuboid.

◆ volume

template<class RealType>
RealType volume
protected

The cuboid's volume.


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