Macros | Functions
acado_utils.hpp File Reference
#include <cmath>
#include <acado/utils/acado_types.hpp>
#include <acado/utils/acado_constants.hpp>
#include <acado/utils/acado_default_options.hpp>
#include <acado/utils/acado_message_handling.hpp>
#include <acado/utils/acado_debugging.hpp>
#include <acado/utils/acado_io_utils.hpp>
Include dependency graph for acado_utils.hpp:

Go to the source code of this file.

Macros

#define M_PI   3.14159265358979323846
 

Functions

double acadoDiv (double nom, double den)
 
int acadoFactorial (int n)
 
BooleanType acadoIsEqual (double x, double y, double TOL=EQUALITY_EPS)
 
BooleanType acadoIsFinite (double x, double TOL=0.1)
 
BooleanType acadoIsGreater (double x, double y, double TOL=EQUALITY_EPS)
 
BooleanType acadoIsInfty (double x, double TOL=0.1)
 
BEGIN_NAMESPACE_ACADO BooleanType acadoIsInteger (double x)
 
BooleanType acadoIsNaN (double x)
 
BooleanType acadoIsNegative (double x, double TOL=EQUALITY_EPS)
 
BooleanType acadoIsPositive (double x, double TOL=EQUALITY_EPS)
 
BooleanType acadoIsSmaller (double x, double y, double TOL=EQUALITY_EPS)
 
BooleanType acadoIsStrictlyGreater (double x, double y, double TOL=EQUALITY_EPS)
 
BooleanType acadoIsStrictlySmaller (double x, double y, double TOL=EQUALITY_EPS)
 
BooleanType acadoIsZero (double x, double TOL=EQUALITY_EPS)
 
int acadoMax (const int x, const int y)
 
double acadoMax (const double x, const double y)
 
int acadoMin (const int x, const int y)
 
double acadoMin (const double x, const double y)
 
double acadoMod (double nom, double den)
 
int acadoRound (double x)
 
int acadoRoundAway (double x)
 
template<class T >
BooleanType isFinite (const T &_value)
 
BooleanType isInfty (const double x)
 

Macro Definition Documentation

#define M_PI   3.14159265358979323846

Definition at line 54 of file acado_utils.hpp.

Function Documentation

double acadoDiv ( double  nom,
double  den 
)

Safe division.

Definition at line 46 of file acado_utils.cpp.

int acadoFactorial ( int  n)

Returns the factorial 1*2*3*...*n of an integer n.

Parameters
nthe input integer n.
Returns
1*2*3*...*n if n>=1
1 if n = 0. (and aborts if n < 0 ).

Definition at line 195 of file acado_utils.cpp.

BooleanType acadoIsEqual ( double  x,
double  y,
double  TOL = EQUALITY_EPS 
)

Returns whether x and y are numerically equal.

Definition at line 88 of file acado_utils.cpp.

BooleanType acadoIsFinite ( double  x,
double  TOL = 0.1 
)

Returns whether x lies within [-INFTY,INFTY].

Definition at line 164 of file acado_utils.cpp.

BooleanType acadoIsGreater ( double  x,
double  y,
double  TOL = EQUALITY_EPS 
)

Returns whether x is numerically greater or equal than y.

Definition at line 106 of file acado_utils.cpp.

BooleanType acadoIsInfty ( double  x,
double  TOL = 0.1 
)

Returns whether x is greater/smaller than +/-INFTY.

Definition at line 154 of file acado_utils.cpp.

BEGIN_NAMESPACE_ACADO BooleanType acadoIsInteger ( double  x)

Returns if x is integer-valued.

Definition at line 37 of file acado_utils.cpp.

BooleanType acadoIsNaN ( double  x)

Returns whether x is not a number.

Definition at line 174 of file acado_utils.cpp.

BooleanType acadoIsNegative ( double  x,
double  TOL = EQUALITY_EPS 
)

Returns whether x is numerically smaller than 0.

Definition at line 141 of file acado_utils.cpp.

BooleanType acadoIsPositive ( double  x,
double  TOL = EQUALITY_EPS 
)

Returns whether x is numerically greater than 0.

Definition at line 134 of file acado_utils.cpp.

BooleanType acadoIsSmaller ( double  x,
double  y,
double  TOL = EQUALITY_EPS 
)

Returns whether x is numerically smaller or equal than y.

Definition at line 113 of file acado_utils.cpp.

BooleanType acadoIsStrictlyGreater ( double  x,
double  y,
double  TOL = EQUALITY_EPS 
)

Returns whether x is numerically strictly greater than y.

Definition at line 120 of file acado_utils.cpp.

BooleanType acadoIsStrictlySmaller ( double  x,
double  y,
double  TOL = EQUALITY_EPS 
)

Returns whether x is numerically strictly smaller than y.

Definition at line 127 of file acado_utils.cpp.

BooleanType acadoIsZero ( double  x,
double  TOL = EQUALITY_EPS 
)

Returns whether x is numerically 0.

Definition at line 148 of file acado_utils.cpp.

int acadoMax ( const int  x,
const int  y 
)

Returns the maximum of x and y.

Definition at line 64 of file acado_utils.cpp.

double acadoMax ( const double  x,
const double  y 
)

Returns the maximum of x and y.

Definition at line 70 of file acado_utils.cpp.

int acadoMin ( const int  x,
const int  y 
)

Returns the minimum of x and y.

Definition at line 76 of file acado_utils.cpp.

double acadoMin ( const double  x,
const double  y 
)

Returns the minimum of x and y.

Definition at line 82 of file acado_utils.cpp.

double acadoMod ( double  nom,
double  den 
)

Safe modulus.

Definition at line 55 of file acado_utils.cpp.

int acadoRound ( double  x)

Specific rounding implemenation for compiler who don't support the round command. Does a round to nearest.

Definition at line 185 of file acado_utils.cpp.

int acadoRoundAway ( double  x)

Specific rounding implementation for rounding away from zero.

Definition at line 205 of file acado_utils.cpp.

template<class T >
BooleanType isFinite ( const T _value)

Checks if any of elements is greater than.

See also
acadoIsFinite

Definition at line 119 of file acado_utils.hpp.

BooleanType isInfty ( const double  x)
inline

Checks whether a constant is infinity.

Definition at line 131 of file acado_utils.hpp.



acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:35:17