Public Types | Public Member Functions | Protected Attributes | Friends | List of all members
Eigen::AutoDiffScalar< _DerType > Class Template Reference

#include <autodiff_scalar.h>

Public Types

typedef internal::auto_diff_special_op< _DerType, !internal::is_same< typename internal::traits< typename internal::remove_all< _DerType >::type >::Scalar, typename NumTraits< typename internal::traits< typename internal::remove_all< _DerType >::type >::Scalar >::Real >::valueBase
 
typedef internal::remove_all< _DerType >::type DerType
 
typedef NumTraits< Scalar >::Real Real
 
typedef internal::traits< DerType >::Scalar Scalar
 

Public Member Functions

 AutoDiffScalar ()
 
 AutoDiffScalar (const AutoDiffScalar &other)
 
template<typename OtherDerType >
 AutoDiffScalar (const AutoDiffScalar< OtherDerType > &other, typename internal::enable_if< internal::is_same< Scalar, typename internal::traits< typename internal::remove_all< OtherDerType >::type >::Scalar >::value &&internal::is_convertible< OtherDerType, DerType >::value, void * >::type=0)
 
 AutoDiffScalar (const Real &value)
 
 AutoDiffScalar (const Scalar &value, const DerType &der)
 
 AutoDiffScalar (const Scalar &value, int nbDer, int derNumber)
 
DerTypederivatives ()
 
const DerTypederivatives () const
 
template<typename OtherDerType >
bool operator!= (const AutoDiffScalar< OtherDerType > &b) const
 
bool operator!= (const Scalar &other) const
 
template<typename OtherDerType >
const AutoDiffScalar< CwiseBinaryOp< internal::scalar_sum_op< Scalar >, const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product), const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all< OtherDerType >::type, Scalar, product)> > operator* (const AutoDiffScalar< OtherDerType > &other) const
 
const AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator* (const Scalar &other) const
 
template<typename OtherDerType >
AutoDiffScalaroperator*= (const AutoDiffScalar< OtherDerType > &other)
 
AutoDiffScalaroperator*= (const Scalar &other)
 
template<typename OtherDerType >
const AutoDiffScalar< CwiseBinaryOp< internal::scalar_sum_op< Scalar >, const DerType, const typename internal::remove_all< OtherDerType >::type > > operator+ (const AutoDiffScalar< OtherDerType > &other) const
 
const AutoDiffScalar< DerType & > operator+ (const Scalar &other) const
 
template<typename OtherDerType >
AutoDiffScalaroperator+= (const AutoDiffScalar< OtherDerType > &other)
 
AutoDiffScalaroperator+= (const Scalar &other)
 
const AutoDiffScalar< CwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const DerType > > operator- () const
 
template<typename OtherDerType >
const AutoDiffScalar< CwiseBinaryOp< internal::scalar_difference_op< Scalar >, const DerType, const typename internal::remove_all< OtherDerType >::type > > operator- (const AutoDiffScalar< OtherDerType > &other) const
 
const AutoDiffScalar< DerType & > operator- (const Scalar &b) const
 
template<typename OtherDerType >
AutoDiffScalaroperator-= (const AutoDiffScalar< OtherDerType > &other)
 
AutoDiffScalaroperator-= (const Scalar &other)
 
template<typename OtherDerType >
const AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(CwiseBinaryOp< internal::scalar_difference_op< Scalar > EIGEN_COMMA const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product) EIGEN_COMMA const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all< OtherDerType >::type, Scalar, product)>, Scalar, product)> operator/ (const AutoDiffScalar< OtherDerType > &other) const
 
const AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator/ (const Scalar &other) const
 
template<typename OtherDerType >
AutoDiffScalaroperator/= (const AutoDiffScalar< OtherDerType > &other)
 
AutoDiffScalaroperator/= (const Scalar &other)
 
template<typename OtherDerType >
bool operator< (const AutoDiffScalar< OtherDerType > &b) const
 
bool operator< (const Scalar &other) const
 
template<typename OtherDerType >
bool operator<= (const AutoDiffScalar< OtherDerType > &b) const
 
bool operator<= (const Scalar &other) const
 
AutoDiffScalaroperator= (const AutoDiffScalar &other)
 
template<typename OtherDerType >
AutoDiffScalaroperator= (const AutoDiffScalar< OtherDerType > &other)
 
AutoDiffScalaroperator= (const Scalar &other)
 
template<typename OtherDerType >
bool operator== (const AutoDiffScalar< OtherDerType > &b) const
 
bool operator== (const Scalar &other) const
 
template<typename OtherDerType >
bool operator> (const AutoDiffScalar< OtherDerType > &b) const
 
bool operator> (const Scalar &other) const
 
template<typename OtherDerType >
bool operator>= (const AutoDiffScalar< OtherDerType > &b) const
 
bool operator>= (const Scalar &other) const
 
Scalarvalue ()
 
const Scalarvalue () const
 

Protected Attributes

DerType m_derivatives
 
Scalar m_value
 

Friends

bool operator!= (const Scalar &a, const AutoDiffScalar &b)
 
const friend AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator* (const Scalar &other, const AutoDiffScalar &a)
 
const friend AutoDiffScalar< DerType & > operator+ (const Scalar &a, const AutoDiffScalar &b)
 
const friend AutoDiffScalar< CwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const DerType > > operator- (const Scalar &a, const AutoDiffScalar &b)
 
const friend AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator/ (const Scalar &other, const AutoDiffScalar &a)
 
bool operator< (const Scalar &a, const AutoDiffScalar &b)
 
std::ostream & operator<< (std::ostream &s, const AutoDiffScalar &a)
 
bool operator<= (const Scalar &a, const AutoDiffScalar &b)
 
bool operator== (const Scalar &a, const AutoDiffScalar &b)
 
bool operator> (const Scalar &a, const AutoDiffScalar &b)
 
bool operator>= (const Scalar &a, const AutoDiffScalar &b)
 

Detailed Description

template<typename _DerType>
class Eigen::AutoDiffScalar< _DerType >

Definition at line 48 of file autodiff_scalar.h.

Member Typedef Documentation

◆ Base

template<typename _DerType >
typedef internal::auto_diff_special_op<_DerType, !internal::is_same<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar, typename NumTraits<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar>::Real>::value> Eigen::AutoDiffScalar< _DerType >::Base

Definition at line 88 of file autodiff_scalar.h.

◆ DerType

template<typename _DerType >
typedef internal::remove_all<_DerType>::type Eigen::AutoDiffScalar< _DerType >::DerType

Definition at line 89 of file autodiff_scalar.h.

◆ Real

template<typename _DerType >
typedef NumTraits<Scalar>::Real Eigen::AutoDiffScalar< _DerType >::Real

Definition at line 91 of file autodiff_scalar.h.

◆ Scalar

template<typename _DerType >
typedef internal::traits<DerType>::Scalar Eigen::AutoDiffScalar< _DerType >::Scalar

Definition at line 90 of file autodiff_scalar.h.

Constructor & Destructor Documentation

◆ AutoDiffScalar() [1/6]

template<typename _DerType >
Eigen::AutoDiffScalar< _DerType >::AutoDiffScalar ( )
inline

Default constructor without any initialization.

Definition at line 97 of file autodiff_scalar.h.

◆ AutoDiffScalar() [2/6]

template<typename _DerType >
Eigen::AutoDiffScalar< _DerType >::AutoDiffScalar ( const Scalar value,
int  nbDer,
int  derNumber 
)
inline

Constructs an active scalar from its value, and initializes the nbDer derivatives such that it corresponds to the derNumber -th variable

Definition at line 100 of file autodiff_scalar.h.

◆ AutoDiffScalar() [3/6]

template<typename _DerType >
Eigen::AutoDiffScalar< _DerType >::AutoDiffScalar ( const Real value)
inline

Conversion from a scalar constant to an active scalar. The derivatives are set to zero.

Definition at line 108 of file autodiff_scalar.h.

◆ AutoDiffScalar() [4/6]

template<typename _DerType >
Eigen::AutoDiffScalar< _DerType >::AutoDiffScalar ( const Scalar value,
const DerType der 
)
inline

Constructs an active scalar from its value and derivatives der

Definition at line 116 of file autodiff_scalar.h.

◆ AutoDiffScalar() [5/6]

template<typename _DerType >
template<typename OtherDerType >
Eigen::AutoDiffScalar< _DerType >::AutoDiffScalar ( const AutoDiffScalar< OtherDerType > &  other,
typename internal::enable_if< internal::is_same< Scalar, typename internal::traits< typename internal::remove_all< OtherDerType >::type >::Scalar >::value &&internal::is_convertible< OtherDerType, DerType >::value, void * >::type  = 0 
)
inline

Definition at line 122 of file autodiff_scalar.h.

◆ AutoDiffScalar() [6/6]

template<typename _DerType >
Eigen::AutoDiffScalar< _DerType >::AutoDiffScalar ( const AutoDiffScalar< _DerType > &  other)
inline

Definition at line 138 of file autodiff_scalar.h.

Member Function Documentation

◆ derivatives() [1/2]

template<typename _DerType >
DerType& Eigen::AutoDiffScalar< _DerType >::derivatives ( )
inline

Definition at line 172 of file autodiff_scalar.h.

◆ derivatives() [2/2]

template<typename _DerType >
const DerType& Eigen::AutoDiffScalar< _DerType >::derivatives ( ) const
inline

Definition at line 171 of file autodiff_scalar.h.

◆ operator!=() [1/2]

template<typename _DerType >
template<typename OtherDerType >
bool Eigen::AutoDiffScalar< _DerType >::operator!= ( const AutoDiffScalar< OtherDerType > &  b) const
inline

Definition at line 211 of file autodiff_scalar.h.

◆ operator!=() [2/2]

template<typename _DerType >
bool Eigen::AutoDiffScalar< _DerType >::operator!= ( const Scalar other) const
inline

Definition at line 178 of file autodiff_scalar.h.

◆ operator*() [1/2]

template<typename _DerType >
template<typename OtherDerType >
const AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product), const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all<OtherDerType>::type, Scalar, product)> > Eigen::AutoDiffScalar< _DerType >::operator* ( const AutoDiffScalar< OtherDerType > &  other) const
inline

Definition at line 374 of file autodiff_scalar.h.

◆ operator*() [2/2]

template<typename _DerType >
const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> Eigen::AutoDiffScalar< _DerType >::operator* ( const Scalar other) const
inline

Definition at line 304 of file autodiff_scalar.h.

◆ operator*=() [1/2]

template<typename _DerType >
template<typename OtherDerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator*= ( const AutoDiffScalar< OtherDerType > &  other)
inline

Definition at line 389 of file autodiff_scalar.h.

◆ operator*=() [2/2]

template<typename _DerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator*= ( const Scalar other)
inline

Definition at line 382 of file autodiff_scalar.h.

◆ operator+() [1/2]

template<typename _DerType >
template<typename OtherDerType >
const AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const DerType, const typename internal::remove_all<OtherDerType>::type> > Eigen::AutoDiffScalar< _DerType >::operator+ ( const AutoDiffScalar< OtherDerType > &  other) const
inline

Definition at line 244 of file autodiff_scalar.h.

◆ operator+() [2/2]

template<typename _DerType >
const AutoDiffScalar<DerType&> Eigen::AutoDiffScalar< _DerType >::operator+ ( const Scalar other) const
inline

Definition at line 216 of file autodiff_scalar.h.

◆ operator+=() [1/2]

template<typename _DerType >
template<typename OtherDerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator+= ( const AutoDiffScalar< OtherDerType > &  other)
inline

Definition at line 254 of file autodiff_scalar.h.

◆ operator+=() [2/2]

template<typename _DerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator+= ( const Scalar other)
inline

Definition at line 236 of file autodiff_scalar.h.

◆ operator-() [1/3]

template<typename _DerType >
const AutoDiffScalar<CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const DerType> > Eigen::AutoDiffScalar< _DerType >::operator- ( ) const
inline

Definition at line 296 of file autodiff_scalar.h.

◆ operator-() [2/3]

template<typename _DerType >
template<typename OtherDerType >
const AutoDiffScalar<CwiseBinaryOp<internal::scalar_difference_op<Scalar>, const DerType, const typename internal::remove_all<OtherDerType>::type> > Eigen::AutoDiffScalar< _DerType >::operator- ( const AutoDiffScalar< OtherDerType > &  other) const
inline

Definition at line 279 of file autodiff_scalar.h.

◆ operator-() [3/3]

template<typename _DerType >
const AutoDiffScalar<DerType&> Eigen::AutoDiffScalar< _DerType >::operator- ( const Scalar b) const
inline

Definition at line 260 of file autodiff_scalar.h.

◆ operator-=() [1/2]

template<typename _DerType >
template<typename OtherDerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator-= ( const AutoDiffScalar< OtherDerType > &  other)
inline

Definition at line 289 of file autodiff_scalar.h.

◆ operator-=() [2/2]

template<typename _DerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator-= ( const Scalar other)
inline

Definition at line 271 of file autodiff_scalar.h.

◆ operator/() [1/2]

template<typename _DerType >
template<typename OtherDerType >
const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE( CwiseBinaryOp<internal::scalar_difference_op<Scalar> EIGEN_COMMA const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product) EIGEN_COMMA const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all<OtherDerType>::type, Scalar, product)>, Scalar, product)> Eigen::AutoDiffScalar< _DerType >::operator/ ( const AutoDiffScalar< OtherDerType > &  other) const
inline

Definition at line 362 of file autodiff_scalar.h.

◆ operator/() [2/2]

template<typename _DerType >
const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> Eigen::AutoDiffScalar< _DerType >::operator/ ( const Scalar other) const
inline

Definition at line 332 of file autodiff_scalar.h.

◆ operator/=() [1/2]

template<typename _DerType >
template<typename OtherDerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator/= ( const AutoDiffScalar< OtherDerType > &  other)
inline

Definition at line 402 of file autodiff_scalar.h.

◆ operator/=() [2/2]

template<typename _DerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator/= ( const Scalar other)
inline

Definition at line 395 of file autodiff_scalar.h.

◆ operator<() [1/2]

template<typename _DerType >
template<typename OtherDerType >
bool Eigen::AutoDiffScalar< _DerType >::operator< ( const AutoDiffScalar< OtherDerType > &  b) const
inline

Definition at line 186 of file autodiff_scalar.h.

◆ operator<() [2/2]

template<typename _DerType >
bool Eigen::AutoDiffScalar< _DerType >::operator< ( const Scalar other) const
inline

Definition at line 173 of file autodiff_scalar.h.

◆ operator<=() [1/2]

template<typename _DerType >
template<typename OtherDerType >
bool Eigen::AutoDiffScalar< _DerType >::operator<= ( const AutoDiffScalar< OtherDerType > &  b) const
inline

Definition at line 191 of file autodiff_scalar.h.

◆ operator<=() [2/2]

template<typename _DerType >
bool Eigen::AutoDiffScalar< _DerType >::operator<= ( const Scalar other) const
inline

Definition at line 174 of file autodiff_scalar.h.

◆ operator=() [1/3]

template<typename _DerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator= ( const AutoDiffScalar< _DerType > &  other)
inline

Definition at line 151 of file autodiff_scalar.h.

◆ operator=() [2/3]

template<typename _DerType >
template<typename OtherDerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator= ( const AutoDiffScalar< OtherDerType > &  other)
inline

Definition at line 144 of file autodiff_scalar.h.

◆ operator=() [3/3]

template<typename _DerType >
AutoDiffScalar& Eigen::AutoDiffScalar< _DerType >::operator= ( const Scalar other)
inline

Definition at line 158 of file autodiff_scalar.h.

◆ operator==() [1/2]

template<typename _DerType >
template<typename OtherDerType >
bool Eigen::AutoDiffScalar< _DerType >::operator== ( const AutoDiffScalar< OtherDerType > &  b) const
inline

Definition at line 206 of file autodiff_scalar.h.

◆ operator==() [2/2]

template<typename _DerType >
bool Eigen::AutoDiffScalar< _DerType >::operator== ( const Scalar other) const
inline

Definition at line 177 of file autodiff_scalar.h.

◆ operator>() [1/2]

template<typename _DerType >
template<typename OtherDerType >
bool Eigen::AutoDiffScalar< _DerType >::operator> ( const AutoDiffScalar< OtherDerType > &  b) const
inline

Definition at line 196 of file autodiff_scalar.h.

◆ operator>() [2/2]

template<typename _DerType >
bool Eigen::AutoDiffScalar< _DerType >::operator> ( const Scalar other) const
inline

Definition at line 175 of file autodiff_scalar.h.

◆ operator>=() [1/2]

template<typename _DerType >
template<typename OtherDerType >
bool Eigen::AutoDiffScalar< _DerType >::operator>= ( const AutoDiffScalar< OtherDerType > &  b) const
inline

Definition at line 201 of file autodiff_scalar.h.

◆ operator>=() [2/2]

template<typename _DerType >
bool Eigen::AutoDiffScalar< _DerType >::operator>= ( const Scalar other) const
inline

Definition at line 176 of file autodiff_scalar.h.

◆ value() [1/2]

template<typename _DerType >
Scalar& Eigen::AutoDiffScalar< _DerType >::value ( )
inline

Definition at line 170 of file autodiff_scalar.h.

◆ value() [2/2]

template<typename _DerType >
const Scalar& Eigen::AutoDiffScalar< _DerType >::value ( ) const
inline

Definition at line 169 of file autodiff_scalar.h.

Friends And Related Function Documentation

◆ operator!=

template<typename _DerType >
bool operator!= ( const Scalar a,
const AutoDiffScalar< _DerType > &  b 
)
friend

Definition at line 184 of file autodiff_scalar.h.

◆ operator*

template<typename _DerType >
const friend AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator* ( const Scalar other,
const AutoDiffScalar< _DerType > &  a 
)
friend

Definition at line 310 of file autodiff_scalar.h.

◆ operator+

template<typename _DerType >
const friend AutoDiffScalar<DerType&> operator+ ( const Scalar a,
const AutoDiffScalar< _DerType > &  b 
)
friend

Definition at line 221 of file autodiff_scalar.h.

◆ operator-

template<typename _DerType >
const friend AutoDiffScalar<CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const DerType> > operator- ( const Scalar a,
const AutoDiffScalar< _DerType > &  b 
)
friend

Definition at line 266 of file autodiff_scalar.h.

◆ operator/

template<typename _DerType >
const friend AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator/ ( const Scalar other,
const AutoDiffScalar< _DerType > &  a 
)
friend

Definition at line 338 of file autodiff_scalar.h.

◆ operator<

template<typename _DerType >
bool operator< ( const Scalar a,
const AutoDiffScalar< _DerType > &  b 
)
friend

Definition at line 179 of file autodiff_scalar.h.

◆ operator<<

template<typename _DerType >
std::ostream& operator<< ( std::ostream &  s,
const AutoDiffScalar< _DerType > &  a 
)
friend

Definition at line 133 of file autodiff_scalar.h.

◆ operator<=

template<typename _DerType >
bool operator<= ( const Scalar a,
const AutoDiffScalar< _DerType > &  b 
)
friend

Definition at line 180 of file autodiff_scalar.h.

◆ operator==

template<typename _DerType >
bool operator== ( const Scalar a,
const AutoDiffScalar< _DerType > &  b 
)
friend

Definition at line 183 of file autodiff_scalar.h.

◆ operator>

template<typename _DerType >
bool operator> ( const Scalar a,
const AutoDiffScalar< _DerType > &  b 
)
friend

Definition at line 181 of file autodiff_scalar.h.

◆ operator>=

template<typename _DerType >
bool operator>= ( const Scalar a,
const AutoDiffScalar< _DerType > &  b 
)
friend

Definition at line 182 of file autodiff_scalar.h.

Member Data Documentation

◆ m_derivatives

template<typename _DerType >
DerType Eigen::AutoDiffScalar< _DerType >::m_derivatives
protected

Definition at line 410 of file autodiff_scalar.h.

◆ m_value

template<typename _DerType >
Scalar Eigen::AutoDiffScalar< _DerType >::m_value
protected

Definition at line 409 of file autodiff_scalar.h.


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


exotica_core
Author(s): Yiming Yang, Michael Camilleri
autogenerated on Fri Aug 2 2024 08:43:03