PX4 Firmware
PX4 Autopilot Software http://px4.io
matrix::Dual< Scalar, N > Struct Template Reference

#include <Dual.hpp>

Collaboration diagram for matrix::Dual< Scalar, N >:

Public Member Functions

 Dual ()=default
 
 Dual (Scalar v, size_t inputDimension=65535)
 
 Dual (Scalar v, const Vector< Scalar, N > &d)
 
Dual< Scalar, N > & operator= (const Scalar &a)
 
Dual< Scalar, N > & operator+= (const Dual< Scalar, N > &a)
 
Dual< Scalar, N > & operator*= (const Dual< Scalar, N > &a)
 
Dual< Scalar, N > & operator-= (const Dual< Scalar, N > &a)
 
Dual< Scalar, N > & operator/= (const Dual< Scalar, N > &a)
 
Dual< Scalar, N > & operator+= (Scalar a)
 
Dual< Scalar, N > & operator-= (Scalar a)
 
Dual< Scalar, N > & operator*= (Scalar a)
 
Dual< Scalar, N > & operator/= (Scalar a)
 

Public Attributes

Scalar value {}
 
Vector< Scalar, N > derivative
 

Static Public Attributes

static constexpr size_t WIDTH = N
 

Detailed Description

template<typename Scalar, size_t N>
struct matrix::Dual< Scalar, N >

Definition at line 25 of file Dual.hpp.

Constructor & Destructor Documentation

◆ Dual() [1/3]

template<typename Scalar, size_t N>
matrix::Dual< Scalar, N >::Dual ( )
default

◆ Dual() [2/3]

template<typename Scalar, size_t N>
matrix::Dual< Scalar, N >::Dual ( Scalar  v,
size_t  inputDimension = 65535 
)
inlineexplicit

◆ Dual() [3/3]

template<typename Scalar, size_t N>
matrix::Dual< Scalar, N >::Dual ( Scalar  v,
const Vector< Scalar, N > &  d 
)
inlineexplicit

Definition at line 42 of file Dual.hpp.

Member Function Documentation

◆ operator*=() [1/2]

template<typename Scalar, size_t N>
Dual<Scalar, N>& matrix::Dual< Scalar, N >::operator*= ( const Dual< Scalar, N > &  a)
inline

Definition at line 58 of file Dual.hpp.

◆ operator*=() [2/2]

template<typename Scalar, size_t N>
Dual<Scalar, N>& matrix::Dual< Scalar, N >::operator*= ( Scalar  a)
inline

Definition at line 83 of file Dual.hpp.

◆ operator+=() [1/2]

template<typename Scalar, size_t N>
Dual<Scalar, N>& matrix::Dual< Scalar, N >::operator+= ( const Dual< Scalar, N > &  a)
inline

Definition at line 53 of file Dual.hpp.

◆ operator+=() [2/2]

template<typename Scalar, size_t N>
Dual<Scalar, N>& matrix::Dual< Scalar, N >::operator+= ( Scalar  a)
inline

Definition at line 73 of file Dual.hpp.

◆ operator-=() [1/2]

template<typename Scalar, size_t N>
Dual<Scalar, N>& matrix::Dual< Scalar, N >::operator-= ( const Dual< Scalar, N > &  a)
inline

Definition at line 63 of file Dual.hpp.

◆ operator-=() [2/2]

template<typename Scalar, size_t N>
Dual<Scalar, N>& matrix::Dual< Scalar, N >::operator-= ( Scalar  a)
inline

Definition at line 78 of file Dual.hpp.

◆ operator/=() [1/2]

template<typename Scalar, size_t N>
Dual<Scalar, N>& matrix::Dual< Scalar, N >::operator/= ( const Dual< Scalar, N > &  a)
inline

Definition at line 68 of file Dual.hpp.

◆ operator/=() [2/2]

template<typename Scalar, size_t N>
Dual<Scalar, N>& matrix::Dual< Scalar, N >::operator/= ( Scalar  a)
inline

Definition at line 88 of file Dual.hpp.

◆ operator=()

template<typename Scalar, size_t N>
Dual<Scalar, N>& matrix::Dual< Scalar, N >::operator= ( const Scalar a)
inline

Definition at line 46 of file Dual.hpp.

References matrix::Matrix< Type, M, 1 >::setZero(), and matrix::Dual< Scalar, N >::value.

Here is the call graph for this function:

Member Data Documentation

◆ derivative

◆ value

◆ WIDTH

template<typename Scalar, size_t N>
constexpr size_t matrix::Dual< Scalar, N >::WIDTH = N
static

Definition at line 27 of file Dual.hpp.


The documentation for this struct was generated from the following file: