MathLib
Loading...
Searching...
No Matches
Dual Number Algebra

Operators

constexpr BasicDual< T > operator* (const BasicDual< T > &left, const BasicDual< T > &right)
 Defines multiplication of two Duals.
 
template<std::floating_point OT = double>
constexpr BasicDual< T > operator* (OT scalar, const BasicDual< T > &d)
 
template<std::floating_point OT = double>
constexpr BasicDual< T > operator* (const BasicDual< T > &d, OT scalar)
 
constexpr BasicDual< T > operator/ (const BasicDual< T > &left, const BasicDual< T > &right)
 Defines division of two Duals.
 
template<std::floating_point OT = double>
constexpr BasicDual< T > operator/ (OT scalar, const BasicDual< T > &d)
 
template<std::floating_point OT = double>
constexpr BasicDual< T > operator/ (const BasicDual< T > &left, OT scalar)
 
constexpr BasicDual< T > operator+ (const BasicDual< T > &left, const BasicDual< T > &right)
 Defines addition of two Duals.
 
template<std::floating_point OT = double>
constexpr BasicDual< T > operator+ (OT scalar, const BasicDual< T > &d)
 Defines addition of a floating-point scalar and a Dual.
 
template<std::floating_point OT = double>
constexpr BasicDual< T > operator+ (const BasicDual< T > &left, OT scalar)
 Defines addition of a Dual and a floating-point scalar.
 
constexpr BasicDual< T > operator- (const BasicDual< T > &left, const BasicDual< T > &right)
 Defines subtraction of two Duals.
 
template<std::floating_point OT = double>
constexpr BasicDual< T > operator- (OT scalar, const BasicDual< T > &d)
 Defines subtraction of a floating-point scalar and a Dual.
 
template<std::floating_point OT = double>
constexpr BasicDual< T > operator- (const BasicDual< T > &left, OT scalar)
 Defines subtraction of a Dual and a floating-point scalar.
 

Detailed Description

Friends

◆ operator* [1/3]

template<class T >
template<std::floating_point OT = double>
constexpr BasicDual< T > operator* ( const BasicDual< T > &  d,
OT  scalar 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines multiplication of a BasicDual and a floating-point scalar

Note
Yes, we need this. What if the type T is NOT a floating-point type? In other parts of the library, we work with a BasicDual<BasicQuaternion<T>>, so T would be a BasicQuaternion<?> and thus, T(scalar) would be constructing a BasicQuaternion from a scalar value.

Definition at line 194 of file Dual.hpp.

◆ operator* [2/3]

template<class T >
constexpr BasicDual< T > operator* ( const BasicDual< T > &  left,
const BasicDual< T > &  right 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines multiplication of two Duals.

Definition at line 167 of file Dual.hpp.

◆ operator* [3/3]

template<class T >
template<std::floating_point OT = double>
constexpr BasicDual< T > operator* ( OT  scalar,
const BasicDual< T > &  d 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines multiplication of a floating-point scalar and a BasicDual

Note
Yes, we need this. What if the type T is NOT a floating-point type? In other parts of the library, we work with a BasicDual<BasicQuaternion<T>>, so T would be a BasicQuaternion<?> and thus, T(scalar) would be constructing a BasicQuaternion from a scalar value.

Definition at line 181 of file Dual.hpp.

◆ operator+ [1/3]

template<class T >
constexpr BasicDual< T > operator+ ( const BasicDual< T > &  left,
const BasicDual< T > &  right 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines addition of two Duals.

Definition at line 235 of file Dual.hpp.

◆ operator+ [2/3]

template<class T >
template<std::floating_point OT = double>
constexpr BasicDual< T > operator+ ( const BasicDual< T > &  left,
OT  scalar 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines addition of a Dual and a floating-point scalar.

Definition at line 249 of file Dual.hpp.

◆ operator+ [3/3]

template<class T >
template<std::floating_point OT = double>
constexpr BasicDual< T > operator+ ( OT  scalar,
const BasicDual< T > &  d 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines addition of a floating-point scalar and a Dual.

Definition at line 242 of file Dual.hpp.

◆ operator- [1/3]

template<class T >
constexpr BasicDual< T > operator- ( const BasicDual< T > &  left,
const BasicDual< T > &  right 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines subtraction of two Duals.

Definition at line 255 of file Dual.hpp.

◆ operator- [2/3]

template<class T >
template<std::floating_point OT = double>
constexpr BasicDual< T > operator- ( const BasicDual< T > &  left,
OT  scalar 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines subtraction of a Dual and a floating-point scalar.

Definition at line 269 of file Dual.hpp.

◆ operator- [3/3]

template<class T >
template<std::floating_point OT = double>
constexpr BasicDual< T > operator- ( OT  scalar,
const BasicDual< T > &  d 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines subtraction of a floating-point scalar and a Dual.

Definition at line 262 of file Dual.hpp.

◆ operator/ [1/3]

template<class T >
constexpr BasicDual< T > operator/ ( const BasicDual< T > &  left,
const BasicDual< T > &  right 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines division of two Duals.

Definition at line 200 of file Dual.hpp.

◆ operator/ [2/3]

template<class T >
template<std::floating_point OT = double>
constexpr BasicDual< T > operator/ ( const BasicDual< T > &  left,
OT  scalar 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines division of a Dual and a floating-point scalar

Note
Yes, we need this. What if the type T is NOT a floating-point type? In other parts of the library, we work with a BasicDual<BasicQuaternion<T>>, so T would be a BasicQuaternion<?> and thus, T(scalar) would be constructing a BasicQuaternion from a scalar value.

Definition at line 229 of file Dual.hpp.

◆ operator/ [3/3]

template<class T >
template<std::floating_point OT = double>
constexpr BasicDual< T > operator/ ( OT  scalar,
const BasicDual< T > &  d 
)
friend

#include <lib/include/Math/math/Dual.hpp>

Defines division of a floating-point scalar and a BasicDual

Note
Yes, we need this. What if the type T is NOT a floating-point type? In other parts of the library, we work with a BasicDual<BasicQuaternion<T>>, so T would be a BasicQuaternion<?> and thus, T(scalar) would be constructing a BasicQuaternion from a scalar value.

Definition at line 215 of file Dual.hpp.