qpOASES
3.1.1
|
#include <math.h>
Functions | |
BEGIN_NAMESPACE_QPOASES BooleanType | isEqual (real_t x, real_t y, real_t TOL) |
BooleanType | isZero (real_t x, real_t TOL) |
real_t | getSign (real_t arg) |
int | getMax (int x, int y) |
int | getMin (int x, int y) |
real_t | getMax (real_t x, real_t y) |
real_t | getMin (real_t x, real_t y) |
real_t | getAbs (real_t x) |
real_t | getSqrt (real_t x) |
Implementation of some inlined utilities for working with the different QProblem classes.
Returns the absolute value of a real number.
x | Real number. |
Referenced by QProblem::addBound_checkLI(), QProblem::addConstraint_checkLI(), QProblemB::backsolveR(), QProblem::backsolveT(), QProblemB::computeCholesky(), QProblemB::computeGivens(), QProblem::computeProjectedCholesky(), QProblemB::determineDataShift(), QProblem::determineDataShift(), QProblemB::determineHessianType(), QProblem::determineStepDirection(), QProblemB::determineStepDirection(), QProblem::dropInfeasibles(), QProblem::ensureNonzeroCurvature(), getKktViolation(), getNorm(), QProblemB::getRelativeHomotopyLength(), QProblem::getRelativeHomotopyLength(), SparseMatrix::getRowNorm(), QProblemB::hotstart(), QProblem::hotstart(), DenseMatrix::isDiag(), isEqual(), isZero(), main(), QProblem::performRamping(), QProblem::printIteration(), and QProblemB::printIteration().
int getMax | ( | int | x, |
int | y | ||
) | [inline] |
Returns maximum of two integers.
x | First integer. |
y | Second integer. |
Referenced by QProblem::ensureNonzeroCurvature(), SolutionAnalysis::getKktViolation(), QProblem::performDriftCorrection(), QProblemB::performDriftCorrection(), QProblem::performRamping(), QProblem::performStep(), QProblemB::performStep(), DenseMatrix::times(), DenseMatrix::transTimes(), QProblemB::updateFarBounds(), and QProblem::updateFarBounds().
Returns maximum of two reals.
x | First real number. |
y | Second real number. |
int getMin | ( | int | x, |
int | y | ||
) | [inline] |
Returns minimum of two integers.
x | First integer. |
y | Second integer. |
Referenced by QProblemB::computeCholesky(), QProblem::computeProjectedCholesky(), QProblem::performDriftCorrection(), QProblemB::performDriftCorrection(), QProblem::QProblem(), QProblemB::updateFarBounds(), and QProblem::updateFarBounds().
Returns minimum of two reals.
x | First real number. |
y | Second real number. |
Returns sign of a real-valued argument.
arg | real-valued argument whose sign is to be determined. |
Returns the square-root of a real number.
x | Non-negative real number. |
Referenced by QProblemB::computeCholesky(), QProblemB::computeGivens(), QProblem::computeProjectedCholesky(), dpotrf_(), getNorm(), SparseMatrix::getRowNorm(), normaliseConstraints(), QProblem::removeBound(), QProblemB::removeBound(), QProblem::removeConstraint(), and spotrf_().
BEGIN_NAMESPACE_QPOASES BooleanType isEqual | ( | real_t | x, |
real_t | y, | ||
real_t | TOL = ZERO |
||
) | [inline] |
Tests whether two real_t-valued arguments are (numerically) equal.
x | First real number. |
y | Second real number. |
TOL | Tolerance for comparison. |
References BT_FALSE, BT_TRUE, and getAbs().
Referenced by dgemm_(), DenseMatrix::getCol(), SparseMatrix::getCol(), SparseMatrixRow::getCol(), getKktViolation(), DenseMatrix::getRow(), SparseMatrix::getRow(), SparseMatrixRow::getRow(), sgemm_(), DenseMatrix::times(), SparseMatrix::times(), SparseMatrixRow::times(), DenseMatrix::transTimes(), SparseMatrix::transTimes(), and SparseMatrixRow::transTimes().
BooleanType isZero | ( | real_t | x, |
real_t | TOL = ZERO |
||
) | [inline] |
Tests whether a real-valued argument is (numerically) zero.
x | Real number. |
TOL | Tolerance for comparison. |
References BT_FALSE, BT_TRUE, and getAbs().
Referenced by SparseMatrix::addToDiag(), SparseMatrixRow::addToDiag(), QProblemB::computeGivens(), QProblemB::determineHessianType(), dgemm_(), QProblem::setA(), sgemm_(), SparseMatrix::SparseMatrix(), SparseMatrixRow::SparseMatrixRow(), DenseMatrix::times(), SparseMatrix::times(), SparseMatrixRow::times(), DenseMatrix::transTimes(), SparseMatrix::transTimes(), and SparseMatrixRow::transTimes().