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

#include <autodiff_scalar.h>

Collaboration diagram for Eigen::AutoDiffScalar< _DerType >:
Collaboration graph

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 internal::traits< DerType >::Scalar Scalar
 
typedef NumTraits< Scalar >::Real Real
 

Public Member Functions

 AutoDiffScalar ()
 
 AutoDiffScalar (const Scalar &value, int nbDer, int derNumber)
 
 AutoDiffScalar (const Real &value)
 
 AutoDiffScalar (const Scalar &value, const DerType &der)
 
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 AutoDiffScalar &other)
 
template<typename OtherDerType >
AutoDiffScalaroperator= (const AutoDiffScalar< OtherDerType > &other)
 
AutoDiffScalaroperator= (const AutoDiffScalar &other)
 
AutoDiffScalaroperator= (const Scalar &other)
 
const Scalarvalue () const
 
Scalarvalue ()
 
const DerTypederivatives () const
 
DerTypederivatives ()
 
bool operator< (const Scalar &other) const
 
bool operator<= (const Scalar &other) const
 
bool operator> (const Scalar &other) const
 
bool operator>= (const Scalar &other) const
 
bool operator== (const Scalar &other) const
 
bool operator!= (const Scalar &other) const
 
template<typename OtherDerType >
bool operator< (const AutoDiffScalar< OtherDerType > &b) const
 
template<typename OtherDerType >
bool operator<= (const AutoDiffScalar< OtherDerType > &b) const
 
template<typename OtherDerType >
bool operator> (const AutoDiffScalar< OtherDerType > &b) const
 
template<typename OtherDerType >
bool operator>= (const AutoDiffScalar< OtherDerType > &b) const
 
template<typename OtherDerType >
bool operator== (const AutoDiffScalar< OtherDerType > &b) const
 
template<typename OtherDerType >
bool operator!= (const AutoDiffScalar< OtherDerType > &b) const
 
const AutoDiffScalar< DerType & > operator+ (const Scalar &other) const
 
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
 
template<typename OtherDerType >
AutoDiffScalaroperator+= (const AutoDiffScalar< OtherDerType > &other)
 
const AutoDiffScalar< DerType & > operator- (const Scalar &b) const
 
AutoDiffScalaroperator-= (const Scalar &other)
 
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
 
template<typename OtherDerType >
AutoDiffScalaroperator-= (const AutoDiffScalar< OtherDerType > &other)
 
const AutoDiffScalar< CwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const DerType > > operator- () const
 
const AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator* (const Scalar &other) const
 
const AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator/ (const Scalar &other) const
 
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
 
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
 
AutoDiffScalaroperator*= (const Scalar &other)
 
template<typename OtherDerType >
AutoDiffScalaroperator*= (const AutoDiffScalar< OtherDerType > &other)
 
AutoDiffScalaroperator/= (const Scalar &other)
 
template<typename OtherDerType >
AutoDiffScalaroperator/= (const AutoDiffScalar< OtherDerType > &other)
 

Protected Attributes

Scalar m_value
 
DerType m_derivatives
 

Friends

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)
 
bool operator== (const Scalar &a, const AutoDiffScalar &b)
 
bool operator!= (const Scalar &a, const AutoDiffScalar &b)
 
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)
 
const friend AutoDiffScalar< EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType, Scalar, product)> operator/ (const Scalar &other, const AutoDiffScalar &a)
 

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

◆ DerType

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

◆ Real

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

◆ Scalar

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

Constructor & Destructor Documentation

◆ AutoDiffScalar() [1/6]

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

Default constructor without any initialization.

◆ 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

◆ 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.

◆ 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

◆ 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

◆ AutoDiffScalar() [6/6]

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

Member Function Documentation

◆ derivatives() [1/2]

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

◆ derivatives() [2/2]

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

◆ operator!=() [1/2]

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

◆ operator!=() [2/2]

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

◆ 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

◆ 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

◆ operator*=() [1/2]

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

◆ operator*=() [2/2]

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

◆ 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

◆ operator+() [2/2]

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

◆ operator+=() [1/2]

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

◆ operator+=() [2/2]

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

◆ operator-() [1/3]

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

◆ 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

◆ operator-() [3/3]

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

◆ operator-=() [1/2]

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

◆ operator-=() [2/2]

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

◆ 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

◆ 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

◆ operator/=() [1/2]

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

◆ operator/=() [2/2]

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

◆ operator<() [1/2]

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

◆ operator<() [2/2]

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

◆ operator<=() [1/2]

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

◆ operator<=() [2/2]

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

◆ operator=() [1/3]

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

◆ operator=() [2/3]

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

◆ operator=() [3/3]

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

◆ operator==() [1/2]

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

◆ operator==() [2/2]

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

◆ operator>() [1/2]

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

◆ operator>() [2/2]

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

◆ operator>=() [1/2]

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

◆ operator>=() [2/2]

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

◆ value() [1/2]

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

◆ value() [2/2]

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

Friends And Related Function Documentation

◆ operator!=

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

◆ 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

◆ operator+

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

◆ operator-

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

◆ 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

◆ operator<

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

◆ operator<<

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

◆ operator<=

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

◆ operator==

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

◆ operator>

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

◆ operator>=

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

Member Data Documentation

◆ m_derivatives

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

◆ m_value

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

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