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. More...
 

Public Member Functions

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

Protected Attributes

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

Detailed Description

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

Uniform distribution of an cuboid space.

Definition at line 220 of file Samplers.h.

Member Typedef Documentation

◆ BoundsType

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

Type to pass the bounds of a dimension.

Definition at line 226 of file Samplers.h.

Constructor & Destructor Documentation

◆ UniformCuboidDistribution()

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.

Definition at line 235 of file Samplers.h.

Member Function Documentation

◆ getDimensionality()

T getDimensionality ( ) const
inline

Returns the cuboid's dimensionality.

Returns
The cuboid's dimensionality.

Definition at line 301 of file Samplers.h.

◆ getVolume()

RealType getVolume ( ) const
inline

Returns the cuboid's volume.

Returns
The cuboid's volume.

Definition at line 291 of file Samplers.h.

◆ isInBounds()

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.

Definition at line 274 of file Samplers.h.

◆ operator()()

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.

Definition at line 259 of file Samplers.h.

Member Data Documentation

◆ spaceDist

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

Distributions for the dimensions of the cuboid.

Definition at line 313 of file Samplers.h.

◆ volume

RealType volume
protected

The cuboid's volume.

Definition at line 309 of file Samplers.h.


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