Uniform distribution of a prolate hyper spheroid.
More...
#include <RobotComponents/components/MotionPlanning/util/Samplers.h>
|
template<class T = std::size_t> |
T | getDimensionality () const |
| Returns the dimensionality of the distribution. More...
|
|
RealType | getDistanceFocalPoints () const |
| Returns the distance between the prolate hyper spheroid's focal points. More...
|
|
RealType | getPolarDiameter () const |
| Returns the prolate hyper spheroid's polar diameter. More...
|
|
std::vector< RealType > | getRotationMatrix () const |
| Returns the rotation matrix stored in a vector. More...
|
|
RealType | getVolume () const |
| Returns the prolate hyper spheroid's volume. More...
|
|
bool | isInBounds (RealType *first) const |
| Returns whether [first, first + dimensionality) is a point contained by the prolate hyper spheroid. More...
|
|
template<class Generator > |
void | operator() (RealType *first, Generator &gen) |
| Fills [first, first + dimensionality) with a uniform sample of the prolate hyper spheroid. More...
|
|
void | setPolarDiameter (RealType newPolarDiameter) |
| Sets the prolate hyper spheroid's polar diameter. More...
|
|
template<class ValIter > |
| UniformProlateSpheroidDistribution (ValIter focalAFirst, ValIter focalALast, ValIter focalBFirst) |
| Constructs a uiform distribution of a prolate hyper spheroid with the focal points [focalAFirst, focalALast) and [focalBFirst, focalBFirst + distance(focalAFirst, focalALast)). More...
|
|
template<class ValIter > |
| UniformProlateSpheroidDistribution (ValIter focalAFirst, ValIter focalALast, ValIter focalBFirst, const std::vector< RealType > &rotationMatrix) |
| Constructs a uiform distribution of a prolate hyper spheroid with the focal points [focalAFirst, focalALast) and [focalBFirst, focalBFirst + distance(focalAFirst, focalALast)) and the given rotation matrix. More...
|
|
|
void | refreshRotationMatrix (const VecType &normalizedFocalPointAToB) |
| Calculates the rotation matrix as described in the paper. More...
|
|
template<class IteratorType > |
void | setFocalPoints (IteratorType focalAFirst, IteratorType focalBFirst, bool updateRotationMatrix=true) |
| Sets the focal points. More...
|
|
template<class RealType = float>
class armarx::UniformProlateSpheroidDistribution< RealType >
Uniform distribution of a prolate hyper spheroid.
Definition at line 321 of file Samplers.h.
◆ MatType
◆ VecType
◆ UniformProlateSpheroidDistribution() [1/2]
Constructs a uiform distribution of a prolate hyper spheroid with the focal points [focalAFirst, focalALast) and [focalBFirst, focalBFirst + distance(focalAFirst, focalALast)).
- Parameters
-
focalAFirst | The first value of the first focal point. |
focalALast | One past the last value of the first focal point. |
focalBFirst | The first value of the second focal point. |
Definition at line 342 of file Samplers.h.
◆ UniformProlateSpheroidDistribution() [2/2]
Constructs a uiform distribution of a prolate hyper spheroid with the focal points [focalAFirst, focalALast) and [focalBFirst, focalBFirst + distance(focalAFirst, focalALast)) and the given rotation matrix.
- Parameters
-
focalAFirst | The first value of the first focal point. |
focalALast | One past the last value of the first focal point. |
focalBFirst | The first value of the second focal point. |
rotationMatrix | The used rotation matrix (the values should be ordered to be conform with eigens mapping of matrices to vectors. (as defined by Eigen::Map<Eigen::Matrix<RealType, dimensionality, dimensionality>>) |
Definition at line 370 of file Samplers.h.
◆ getDimensionality()
T getDimensionality |
( |
| ) |
const |
|
inline |
Returns the dimensionality of the distribution.
- Returns
- The dimensionality of the distribution.
Definition at line 413 of file Samplers.h.
◆ getDistanceFocalPoints()
RealType getDistanceFocalPoints |
( |
| ) |
const |
|
inline |
Returns the distance between the prolate hyper spheroid's focal points.
- Returns
- The distance between the prolate hyper spheroid's focal points.
Definition at line 444 of file Samplers.h.
◆ getPolarDiameter()
RealType getPolarDiameter |
( |
| ) |
const |
|
inline |
Returns the prolate hyper spheroid's polar diameter.
- Returns
- The prolate hyper spheroid's polar diameter.
Definition at line 453 of file Samplers.h.
◆ getRotationMatrix()
std::vector<RealType> getRotationMatrix |
( |
| ) |
const |
|
inline |
Returns the rotation matrix stored in a vector.
- Returns
- The rotation matrix stored in a vector.
Definition at line 487 of file Samplers.h.
◆ getVolume()
RealType getVolume |
( |
| ) |
const |
|
inline |
Returns the prolate hyper spheroid's volume.
- Returns
- The prolate hyper spheroid's volume.
Definition at line 435 of file Samplers.h.
◆ isInBounds()
bool isInBounds |
( |
RealType * |
first | ) |
const |
|
inline |
Returns whether [first, first + dimensionality) is a point contained by the prolate hyper spheroid.
- Parameters
-
first | The first value of the point to check. |
- Returns
- Whether [first, first + dimensionality) is a point contained by the prolate hyper spheroid.
Definition at line 423 of file Samplers.h.
◆ operator()()
void operator() |
( |
RealType * |
first, |
|
|
Generator & |
gen |
|
) |
| |
|
inline |
Fills [first, first + dimensionality) with a uniform sample of the prolate hyper spheroid.
- Parameters
-
first | The first value to fill. |
gen | The used generator. |
Definition at line 399 of file Samplers.h.
◆ refreshRotationMatrix()
void refreshRotationMatrix |
( |
const VecType & |
normalizedFocalPointAToB | ) |
|
|
inlineprotected |
Calculates the rotation matrix as described in the paper.
Variable names (mostly) represent the names from the paper
- Parameters
-
normalizedFocalPointAToB | corresponds to a_1 from the paper |
Definition at line 535 of file Samplers.h.
◆ setFocalPoints()
void setFocalPoints |
( |
IteratorType |
focalAFirst, |
|
|
IteratorType |
focalBFirst, |
|
|
bool |
updateRotationMatrix = true |
|
) |
| |
|
inlineprotected |
Sets the focal points.
- Parameters
-
focalAFirst | The first value of the first focal point. |
focalBFirst | The first value of the second focal point. |
updateRotationMatrix | Whether the rotation matrix should be calculated. |
Definition at line 502 of file Samplers.h.
◆ setPolarDiameter()
void setPolarDiameter |
( |
RealType |
newPolarDiameter | ) |
|
|
inline |
Sets the prolate hyper spheroid's polar diameter.
- Parameters
-
The | new prolate hyper spheroid's polar diameter. |
Definition at line 462 of file Samplers.h.
◆ centre
The prolate hyper spheroid's center.
(0.5 * (focalPointA + focalPointB))
Definition at line 608 of file Samplers.h.
◆ distanceFocalPoints
RealType distanceFocalPoints |
|
protected |
The distance of the focalpoints.
Definition at line 587 of file Samplers.h.
◆ focalPointA
The prolate hyper spheroid's first focal point.
Definition at line 600 of file Samplers.h.
◆ focalPointB
The prolate hyper spheroid's second focal point.
Definition at line 604 of file Samplers.h.
◆ polarDiameter
The prolate hyper spheroid's diameter.
Definition at line 591 of file Samplers.h.
◆ rotation
The used rotation matrix.
Definition at line 612 of file Samplers.h.
◆ scaleThenRotate
The used transformation matrix to transform uniform points from the volume of a sphere to a uniform sample of the prolate hyper spheroid's volume.
Definition at line 617 of file Samplers.h.
◆ sphereDistribution
The internal used sphere volume distribution.
(It's results are transformed to the prolate hyper spheroid)
Definition at line 578 of file Samplers.h.
◆ tmpVal
std::vector<RealType> tmpVal |
|
mutableprotected |
Buffer for a temporary sample.
Definition at line 583 of file Samplers.h.
◆ volumeProlateSpheroid
RealType volumeProlateSpheroid |
|
protected |
The prolate hyper spheroid's volume.
Definition at line 595 of file Samplers.h.
The documentation for this class was generated from the following file:
- RobotComponents/components/MotionPlanning/util/Samplers.h