The set of utility functions. More...
Functions | |
template<typename T > | |
bool | Less (std::pair< float, T > a, std::pair< float, T > b) |
Comparison function for pairs of the form <float, T> For sorting purposes. More... | |
bool | linearProgram1 (const std::vector< Line > &lines, unsigned long curr, float radius, const Vector &optVelocity, bool directionOpt, Vector &result) |
Solves a one-dimensional linear program on a specified line subject to linear constraints defined by lines and a circular constraint. More... | |
unsigned long int | linearProgram2 (const std::vector< Line > &lines, float radius, const Vector &optVelocity, bool directionOpt, Vector &result) |
Solves a two-dimensional linear program subject to linear constraints defined by lines and a circular constraint. More... | |
void | linearProgram3 (const std::vector< Line > &lines, size_t numObstLines, size_t beginLine, float radius, Vector &result) |
Solves a two-dimensional linear program subject to linear constraints defined by lines and a circular constraint. More... | |
template<typename T > | |
bool | More (std::pair< float, T > a, std::pair< float, T > b) |
Comparison function for pairs of the form <float, T> For sorting purposes. More... | |
float | SqPointSegDistance (Point L1, Point L2, Point P) |
Computes squared euclidean distance from point to line segment. More... | |
The set of utility functions.
bool Utils::Less | ( | std::pair< float, T > | a, |
std::pair< float, T > | b | ||
) |
bool Utils::linearProgram1 | ( | const std::vector< Line > & | lines, |
unsigned long | curr, | ||
float | radius, | ||
const Vector & | optVelocity, | ||
bool | directionOpt, | ||
Vector & | result | ||
) |
Solves a one-dimensional linear program on a specified line subject to linear constraints defined by lines and a circular constraint.
lines | Lines defining the linear constraints. |
curr | The specified line constraint. |
radius | The radius of the circular constraint. |
optVelocity | The optimization velocity. |
directionOpt | True if the direction should be optimized. |
result | A reference to the result of the linear program. |
unsigned long int Utils::linearProgram2 | ( | const std::vector< Line > & | lines, |
float | radius, | ||
const Vector & | optVelocity, | ||
bool | directionOpt, | ||
Vector & | result | ||
) |
Solves a two-dimensional linear program subject to linear constraints defined by lines and a circular constraint.
lines | Lines defining the linear constraints. |
radius | The radius of the circular constraint. |
optVelocity | The optimization velocity. |
directionOpt | True if the direction should be optimized. |
result | A reference to the result of the linear program. |
void Utils::linearProgram3 | ( | const std::vector< Line > & | lines, |
size_t | numObstLines, | ||
size_t | beginLine, | ||
float | radius, | ||
Vector & | result | ||
) |
Solves a two-dimensional linear program subject to linear constraints defined by lines and a circular constraint.
lines | Lines defining the linear constraints. |
numObstLines | Count of obstacle lines. |
beginLine | The line on which the 2-d linear program failed. |
radius | The radius of the circular constraint. |
result | A reference to the result of the linear program. |
bool Utils::More | ( | std::pair< float, T > | a, |
std::pair< float, T > | b | ||
) |