ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adoremath.h File Reference
#include <dlib/matrix.h>
#include <math.h>
#include <algorithm>
Include dependency graph for adoremath.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 adore
 
 adore::mad
 

Macros

#define _USE_MATH_DEFINES
 
#define adoreMatrix   dlib::matrix
 

Functions

template<typename T >
void adore::mad::set (T *data, T value, int size)
 
template<typename T >
adoreMatrix< T, 1, 0 > adore::mad::sequence (T x0, T dx, T xend)
 
template<typename T >
int adore::mad::sequence (T x0, T dx, T xend, T *target, int max_size)
 
template<typename T >
void adore::mad::sequence (T x0, T dx, T *target, int size)
 
template<typename T , int n>
adoreMatrix< T, 1, n > adore::mad::linspace (T x0, T x1)
 
template<typename T >
adoreMatrix< T, 1, 0 > adore::mad::linspace (T x0, T x1, int n)
 
template<typename T , typename Tarray >
void adore::mad::linspace (T x0, T x1, Tarray &target, int n)
 
template<typename T >
void adore::mad::copyToArray (const adoreMatrix< T > &m, T *target)
 
template<typename T , long nr, long nc>
void adore::mad::copyToArray (const adoreMatrix< T, nr, nc > &m, T *target)
 
template<typename T , long nr, long nc>
void adore::mad::copyRowToArray (const adoreMatrix< T, nr, nc > &m, T *target, int col)
 
int adore::mad::binomial (int n, int k)
 
template<typename T >
adore::mad::remainder (T x, T d)
 
template<typename T , long N>
adore::mad::norm2 (const adoreMatrix< T, N, 1 > &x)
 
template<typename T , long N>
void adore::mad::createAngularContinuity (adoreMatrix< T, N, 0 > &data, int row)
 
template<typename T >
void adore::mad::comparePointWithLine (T a, T b, T c, T d, T e, T f, T &d_tangential, T &d_normal)
 
template<typename T >
void adore::mad::getRelativeCoordinatesPointVSLine (T a, T b, T c, T d, T e, T f, T &d_tangential, T &d_normal)
 
template<typename T >
double adore::mad::getDistancePointToLine (T a, T b, T c, T d, T e, T f, T &rel, T &n)
 
template<typename T >
double adore::mad::getDistancePointToLine (T a, T b, T c, T d, T e, T f, T &rel)
 
template<typename T1 , typename T2 >
bool adore::mad::toRelativeWithNormalExtrapolation (double qX, double qY, const T1 pi, const T1 pj, const T2 ni, const T2 nj, double &s, double &t)
 Transformation from Euclidean coordinate system to a relative coordinate system represented by linear-piecewise function xy and normal. The approximation of the originally non-linear function leads to inconsistencies with simpler methods. The following equation is fulfilled: q=pi+s/L*(pj-pi)+t*(ni+s/L*(nj-ni)) More...
 
template<typename T1 , typename T2 >
bool adore::mad::toRelativeWithNormalExtrapolation (double qX, double qY, T1 centerline, T2 normals, double &s, double &t)
 
template<typename T1 , typename T2 >
bool adore::mad::fromRelative (double s, double t, const T1 pi, const T1 pj, const T2 ni, const T2 nj, double &X, double &Y, double &Z)
 Transform from relative coordinates to Euclidean coordinates. More...
 
template<typename T1 , typename T2 >
void adore::mad::fromRelative (double s, double t, T1 centerline, T2 normals, double &X, double &Y, double &Z)
 transform from relative coordinates for given centerline and normal functions More...
 
template<typename T >
bool adore::mad::intersectLines (T a, T b, T c, T d, T e, T f, T g, T h, T &x0, T &x1, bool &x0_inside, bool &x1_inside)
 
template<typename T >
bool adore::mad::intersectLines2 (T a, T b, T c, T d, T e, T f, T g, T h, T &x0, T &x1, T eps)
 
template<typename T >
adore::mad::bound (T lb, T value, T ub)
 
template<typename T >
void adore::mad::bound (T lb, T value[], size_t count, T ub)
 
template<typename T >
bool adore::mad::annotatedDataOrdering_fct (std::pair< double, T > i, std::pair< double, T > j)
 
template<typename T >
T * adore::mad::cross (T *u, T *v, T *s)
 
template<int d, typename T >
adore::mad::dot (T *u, T *v)
 
template<int k, typename T >
T * adore::mad::normalize (T *v)
 
template<typename T >
void adore::mad::extendBounds (T &min, T value, T &max)
 
template<typename T >
bool adore::mad::overlaps (const T &a0, const T &a1, const T &b0, const T &b1)
 
template<typename T >
adore::mad::min (T a, T b, T c, T d)
 
template<typename T , long N, long M>
adoreMatrix< T, N, M > adore::mad::min (adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
 
template<typename T , long N, long M>
adoreMatrix< T, N, M > adore::mad::max (adoreMatrix< T, N, M > a, const adoreMatrix< T, N, M > &b)
 
double adore::mad::min (double a, const double &b)
 
double adore::mad::max (double a, const double &b)
 
float adore::mad::min (float a, const float &b)
 
float adore::mad::max (float a, const float &b)
 
int adore::mad::min (int a, const int &b)
 
int adore::mad::max (int a, const int &b)
 
template<typename T >
int adore::mad::signum (T val)
 

Macro Definition Documentation

◆ _USE_MATH_DEFINES

#define _USE_MATH_DEFINES

◆ adoreMatrix

#define adoreMatrix   dlib::matrix