PX4 Firmware
PX4 Autopilot Software http://px4.io
Dual.hpp File Reference

This is a dual number type for calculating automatic derivatives. More...

#include "math.hpp"
Include dependency graph for Dual.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  matrix::Vector< Type, M >
 
struct  matrix::Dual< Scalar, N >
 

Namespaces

 matrix
 

Functions

template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator+ (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator- (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator+ (const Dual< Scalar, N > &a, const Dual< Scalar, N > &b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator- (const Dual< Scalar, N > &a, const Dual< Scalar, N > &b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator+ (const Dual< Scalar, N > &a, Scalar b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator- (const Dual< Scalar, N > &a, Scalar b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator+ (Scalar a, const Dual< Scalar, N > &b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator- (Scalar a, const Dual< Scalar, N > &b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator* (const Dual< Scalar, N > &a, const Dual< Scalar, N > &b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator* (const Dual< Scalar, N > &a, Scalar b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator* (Scalar a, const Dual< Scalar, N > &b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator/ (const Dual< Scalar, N > &a, const Dual< Scalar, N > &b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator/ (const Dual< Scalar, N > &a, Scalar b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::operator/ (Scalar a, const Dual< Scalar, N > &b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::sqrt (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::abs (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::ceil (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::floor (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::fmod (const Dual< Scalar, N > &a, Scalar mod)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::max (const Dual< Scalar, N > &a, const Dual< Scalar, N > &b)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::min (const Dual< Scalar, N > &a, const Dual< Scalar, N > &b)
 
template<typename Scalar >
bool matrix::IsNan (Scalar a)
 
template<typename Scalar , size_t N>
bool matrix::IsNan (const Dual< Scalar, N > &a)
 
template<typename Scalar >
bool matrix::IsFinite (Scalar a)
 
template<typename Scalar , size_t N>
bool matrix::IsFinite (const Dual< Scalar, N > &a)
 
template<typename Scalar >
bool matrix::IsInf (Scalar a)
 
template<typename Scalar , size_t N>
bool matrix::IsInf (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::sin (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::cos (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::tan (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::asin (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::acos (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::atan (const Dual< Scalar, N > &a)
 
template<typename Scalar , size_t N>
Dual< Scalar, N > matrix::atan2 (const Dual< Scalar, N > &a, const Dual< Scalar, N > &b)
 
template<typename Scalar , size_t M, size_t N>
Matrix< Scalar, M, N > matrix::collectDerivatives (const Matrix< Dual< Scalar, N >, M, 1 > &input)
 
template<typename Scalar , size_t M, size_t N, size_t D>
Matrix< Scalar, M, N > matrix::collectReals (const Matrix< Dual< Scalar, D >, M, N > &input)
 

Detailed Description

This is a dual number type for calculating automatic derivatives.

Based roughly on the methods described in: Automatic Differentiation, C++ Templates and Photogrammetry, by Dan Piponi and Ceres Solver's excellent Jet.h

Author
Julian Kent julia.nosp@m.n@au.nosp@m.terio.nosp@m.n.co.nosp@m.m

Definition in file Dual.hpp.