Parasol Planning Library (PPL)
|
#include "MPUtils.h"
#include "MetricUtils.h"
#include "ConfigurationSpace/Cfg.h"
#include "MPProblem/Robot/Robot.h"
Functions | |
double | DRand () |
long | LRand () |
long | MRand () |
double | GRand (bool _reset) |
double | GaussianDistribution (double _mean, double _stdev) |
Same as GRand, but one can specify the mean and stdev of the distribution. More... | |
void | SRand (const unsigned long _seed) |
Use seedval as the seed. More... | |
double | Normalize (const double &_a) |
Normalize a value into the range [-1,1). More... | |
double | TriangleHeight (const Point3d &_a, const Point3d &_b, const Point3d &_c) |
bool | PtInTriangle (const Point2d &_a, const Point2d &_b, const Point2d &_c, const Point2d &_p) |
bool | PtInTriangle (const Point2d &_a, const Point2d &_b, const Point2d &_c, const Point2d &_p, double &_u, double &_v) |
Point3d | GetPtFromBarycentricCoords (const Point3d &_a, const Point3d &_b, const Point3d &_c, double _u, double _v) |
double | NormalizeTheta (double _theta) |
bool | binom_test (double _alpha, size_t _n, size_t _k, double _p) |
double | binomial (size_t _n, size_t _k, double _p) |
std::vector< Cfg > | LoadPath (const std::string &_filename, Robot *_robot) |
Loads a configuration path from a file for a dynamic obstacle. More... | |
bool binom_test | ( | double | _alpha, |
size_t | _n, | ||
size_t | _k, | ||
double | _p | ||
) |
Given a significance level, the number of trials, the number of successes and the probability of success. Conduct a two-sided p-test.
_alpha | The reference configuration. |
_n | The number of trials conducted |
_k | The number of trial successes |
_p | The probability of success for the null. The assumed true value of success |
double binomial | ( | size_t | _n, |
size_t | _k, | ||
double | _p | ||
) |
Given the number of trials, the number of successes, and the probability of success, returns the probability density function evaluated k.
_n | The number of trials |
_k | The number of successes we are interested in |
_p | The probability of success |
double DRand | ( | ) |
Return non-negative double-prevision floating-point values uniformly distributed over the interval [0.0, 1.0).
double GaussianDistribution | ( | double | _mean, |
double | _stdev | ||
) |
Same as GRand, but one can specify the mean and stdev of the distribution.
Point3d GetPtFromBarycentricCoords | ( | const Point3d & | _a, |
const Point3d & | _b, | ||
const Point3d & | _c, | ||
double | _u, | ||
double | _v | ||
) |
Given triange defined by _a, _b, _c, return the point inside triangle defined by barycentric coordinates _u, _v.
double GRand | ( | bool | _reset = false | ) |
Return normally(gaussian) distributed random numbers via the Marsaglia polar method.
_reset | If true, clear internal cache and return 0. |
Loads a configuration path from a file for a dynamic obstacle.
long LRand | ( | ) |
Return non-negative long integers uniformly distributed over the interval [0, 2**31).
long MRand | ( | ) |
Return signed long integers uniformly distributed over the interval [-2**31, 2**31).
double Normalize | ( | const double & | _a | ) |
Normalize a value into the range [-1,1).
double NormalizeTheta | ( | double | _theta | ) |
Normalize an angle to standard range.
_theta | The angle to normalize. |
bool PtInTriangle | ( | const Point2d & | _a, |
const Point2d & | _b, | ||
const Point2d & | _c, | ||
const Point2d & | _p | ||
) |
Check if a 2d point lies inside the triangle defined by three other points.
_a | The first triangle vertex. |
_b | The second triangle vertex. |
_c | The third triangle vertex. |
_p | The query point. |
bool PtInTriangle | ( | const Point2d & | _a, |
const Point2d & | _b, | ||
const Point2d & | _c, | ||
const Point2d & | _p, | ||
double & | _u, | ||
double & | _v | ||
) |
Check if a 2d point lies inside the triangle defined by three other points.
_a | The first triangle vertex. |
_b | The second triangle vertex. |
_c | The third triangle vertex. |
_p | The query point. |
_u | The barycentric coordinate factor for _b. |
_v | The barycentric coordinate factor for _c. |
void SRand | ( | const unsigned long | _seed | ) |
Use seedval as the seed.
double TriangleHeight | ( | const Point3d & | _a, |
const Point3d & | _b, | ||
const Point3d & | _c | ||
) |
Determine height of triangle defined by three points.
_a | The first triangle vertex. |
_b | The second triangle vertex. |
_c | The third triangle vertex. |