Eigen::AutoDiffVector< ValueType, JacobianType > Class Template Reference

Public Types

typedef AutoDiffScalar< Matrix< BaseScalar, JacobianType::RowsAtCompileTime, 1 > > ActiveScalar
 
typedef internal::traits< ValueType >::Scalar BaseScalar
 
typedef AutoDiffScalar< typename JacobianType::ColXpr > CoeffType
 
typedef JacobianType::Index Index
 
typedef ActiveScalar Scalar
 

Public Member Functions

 AutoDiffVector ()
 
 AutoDiffVector (const AutoDiffVector &other)
 
template<typename OtherValueType , typename OtherJacobianType >
 AutoDiffVector (const AutoDiffVector< OtherValueType, OtherJacobianType > &other)
 
 AutoDiffVector (const ValueType &values)
 
 AutoDiffVector (const ValueType &values, const JacobianType &jac)
 
CoeffType coeffRef (Index i)
 
const CoeffType coeffRef (Index i) const
 
JacobianType & jacobian ()
 
const JacobianType & jacobian () const
 
CoeffType operator() (Index i)
 
const CoeffType operator() (Index i) const
 
const AutoDiffVector< typename MakeCwiseUnaryOp< internal::scalar_multiple_op< Scalar >, ValueType >::Type, typename MakeCwiseUnaryOp< internal::scalar_multiple_op< Scalar >, JacobianType >::Typeoperator* (const BaseScalar &other) const
 
template<typename OtherValueType , typename OtherJacobianType >
AutoDiffVectoroperator*= (const AutoDiffVector< OtherValueType, OtherJacobianType > &other)
 
AutoDiffVectoroperator*= (const Scalar &other)
 
template<typename OtherValueType , typename OtherJacobianType >
const AutoDiffVector< typename MakeCwiseBinaryOp< internal::scalar_sum_op< BaseScalar >, ValueType, OtherValueType >::Type, typename MakeCwiseBinaryOp< internal::scalar_sum_op< BaseScalar >, JacobianType, OtherJacobianType >::Typeoperator+ (const AutoDiffVector< OtherValueType, OtherJacobianType > &other) const
 
template<typename OtherValueType , typename OtherJacobianType >
AutoDiffVectoroperator+= (const AutoDiffVector< OtherValueType, OtherJacobianType > &other)
 
const AutoDiffVector< typename MakeCwiseUnaryOp< internal::scalar_opposite_op< Scalar >, ValueType >::Type, typename MakeCwiseUnaryOp< internal::scalar_opposite_op< Scalar >, JacobianType >::Typeoperator- () const
 
template<typename OtherValueType , typename OtherJacobianType >
const AutoDiffVector< typename MakeCwiseBinaryOp< internal::scalar_difference_op< Scalar >, ValueType, OtherValueType >::Type, typename MakeCwiseBinaryOp< internal::scalar_difference_op< Scalar >, JacobianType, OtherJacobianType >::Typeoperator- (const AutoDiffVector< OtherValueType, OtherJacobianType > &other) const
 
template<typename OtherValueType , typename OtherJacobianType >
AutoDiffVectoroperator-= (const AutoDiffVector< OtherValueType, OtherJacobianType > &other)
 
AutoDiffVectoroperator= (const AutoDiffVector &other)
 
template<typename OtherValueType , typename OtherJacobianType >
AutoDiffVectoroperator= (const AutoDiffVector< OtherValueType, OtherJacobianType > &other)
 
CoeffType operator[] (Index i)
 
const CoeffType operator[] (Index i) const
 
Index size () const
 
Scalar sum () const
 
ValueType & values ()
 
const ValueType & values () const
 

Protected Attributes

JacobianType m_jacobian
 
ValueType m_values
 

Detailed Description

template<typename ValueType, typename JacobianType>
class Eigen::AutoDiffVector< ValueType, JacobianType >

Definition at line 35 of file AutoDiffVector.h.

Member Typedef Documentation

◆ ActiveScalar

template<typename ValueType , typename JacobianType >
typedef AutoDiffScalar<Matrix<BaseScalar,JacobianType::RowsAtCompileTime,1> > Eigen::AutoDiffVector< ValueType, JacobianType >::ActiveScalar

Definition at line 40 of file AutoDiffVector.h.

◆ BaseScalar

template<typename ValueType , typename JacobianType >
typedef internal::traits<ValueType>::Scalar Eigen::AutoDiffVector< ValueType, JacobianType >::BaseScalar

Definition at line 39 of file AutoDiffVector.h.

◆ CoeffType

template<typename ValueType , typename JacobianType >
typedef AutoDiffScalar<typename JacobianType::ColXpr> Eigen::AutoDiffVector< ValueType, JacobianType >::CoeffType

Definition at line 42 of file AutoDiffVector.h.

◆ Index

template<typename ValueType , typename JacobianType >
typedef JacobianType::Index Eigen::AutoDiffVector< ValueType, JacobianType >::Index

Definition at line 43 of file AutoDiffVector.h.

◆ Scalar

template<typename ValueType , typename JacobianType >
typedef ActiveScalar Eigen::AutoDiffVector< ValueType, JacobianType >::Scalar

Definition at line 41 of file AutoDiffVector.h.

Constructor & Destructor Documentation

◆ AutoDiffVector() [1/5]

template<typename ValueType , typename JacobianType >
Eigen::AutoDiffVector< ValueType, JacobianType >::AutoDiffVector ( )
inline

Definition at line 45 of file AutoDiffVector.h.

45 {}

◆ AutoDiffVector() [2/5]

template<typename ValueType , typename JacobianType >
Eigen::AutoDiffVector< ValueType, JacobianType >::AutoDiffVector ( const ValueType &  values)
inline

Definition at line 47 of file AutoDiffVector.h.

48  : m_values(values)
49  {
50  m_jacobian.setZero();
51  }
const ValueType & values() const

◆ AutoDiffVector() [3/5]

template<typename ValueType , typename JacobianType >
Eigen::AutoDiffVector< ValueType, JacobianType >::AutoDiffVector ( const ValueType &  values,
const JacobianType &  jac 
)
inline

Definition at line 69 of file AutoDiffVector.h.

70  : m_values(values), m_jacobian(jac)
71  {}

◆ AutoDiffVector() [4/5]

template<typename ValueType , typename JacobianType >
template<typename OtherValueType , typename OtherJacobianType >
Eigen::AutoDiffVector< ValueType, JacobianType >::AutoDiffVector ( const AutoDiffVector< OtherValueType, OtherJacobianType > &  other)
inline

Definition at line 74 of file AutoDiffVector.h.

75  : m_values(other.values()), m_jacobian(other.jacobian())
76  {}

◆ AutoDiffVector() [5/5]

template<typename ValueType , typename JacobianType >
Eigen::AutoDiffVector< ValueType, JacobianType >::AutoDiffVector ( const AutoDiffVector< ValueType, JacobianType > &  other)
inline

Definition at line 78 of file AutoDiffVector.h.

79  : m_values(other.values()), m_jacobian(other.jacobian())
80  {}

Member Function Documentation

◆ coeffRef() [1/2]

template<typename ValueType , typename JacobianType >
CoeffType Eigen::AutoDiffVector< ValueType, JacobianType >::coeffRef ( Index  i)
inline

Definition at line 60 of file AutoDiffVector.h.

60 { return CoeffType(m_values[i], m_jacobian.col(i)); }
AutoDiffScalar< typename JacobianType::ColXpr > CoeffType

◆ coeffRef() [2/2]

template<typename ValueType , typename JacobianType >
const CoeffType Eigen::AutoDiffVector< ValueType, JacobianType >::coeffRef ( Index  i) const
inline

Definition at line 61 of file AutoDiffVector.h.

61 { return CoeffType(m_values[i], m_jacobian.col(i)); }

◆ jacobian() [1/2]

template<typename ValueType , typename JacobianType >
JacobianType& Eigen::AutoDiffVector< ValueType, JacobianType >::jacobian ( )
inline

Definition at line 101 of file AutoDiffVector.h.

101 { return m_jacobian; }

◆ jacobian() [2/2]

template<typename ValueType , typename JacobianType >
const JacobianType& Eigen::AutoDiffVector< ValueType, JacobianType >::jacobian ( ) const
inline

Definition at line 100 of file AutoDiffVector.h.

100 { return m_jacobian; }

◆ operator()() [1/2]

template<typename ValueType , typename JacobianType >
CoeffType Eigen::AutoDiffVector< ValueType, JacobianType >::operator() ( Index  i)
inline

Definition at line 57 of file AutoDiffVector.h.

57 { return CoeffType(m_values[i], m_jacobian.col(i)); }

◆ operator()() [2/2]

template<typename ValueType , typename JacobianType >
const CoeffType Eigen::AutoDiffVector< ValueType, JacobianType >::operator() ( Index  i) const
inline

Definition at line 58 of file AutoDiffVector.h.

58 { return CoeffType(m_values[i], m_jacobian.col(i)); }

◆ operator*()

template<typename ValueType , typename JacobianType >
const AutoDiffVector< typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, ValueType>::Type, typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, JacobianType>::Type> Eigen::AutoDiffVector< ValueType, JacobianType >::operator* ( const BaseScalar other) const
inline

Definition at line 162 of file AutoDiffVector.h.

163  {
164  return AutoDiffVector<
165  typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, ValueType>::Type,
166  typename MakeCwiseUnaryOp<internal::scalar_multiple_op<Scalar>, JacobianType>::Type >(
167  m_values * other,
168  m_jacobian * other);
169  }
Type

◆ operator*=() [1/2]

template<typename ValueType , typename JacobianType >
template<typename OtherValueType , typename OtherJacobianType >
AutoDiffVector& Eigen::AutoDiffVector< ValueType, JacobianType >::operator*= ( const AutoDiffVector< OtherValueType, OtherJacobianType > &  other)
inline

Definition at line 208 of file AutoDiffVector.h.

209  {
210  *this = *this * other;
211  return *this;
212  }

◆ operator*=() [2/2]

template<typename ValueType , typename JacobianType >
AutoDiffVector& Eigen::AutoDiffVector< ValueType, JacobianType >::operator*= ( const Scalar other)
inline

Definition at line 200 of file AutoDiffVector.h.

201  {
202  m_values *= other;
203  m_jacobian *= other;
204  return *this;
205  }

◆ operator+()

template<typename ValueType , typename JacobianType >
template<typename OtherValueType , typename OtherJacobianType >
const AutoDiffVector< typename MakeCwiseBinaryOp<internal::scalar_sum_op<BaseScalar>,ValueType,OtherValueType>::Type, typename MakeCwiseBinaryOp<internal::scalar_sum_op<BaseScalar>,JacobianType,OtherJacobianType>::Type > Eigen::AutoDiffVector< ValueType, JacobianType >::operator+ ( const AutoDiffVector< OtherValueType, OtherJacobianType > &  other) const
inline

Definition at line 107 of file AutoDiffVector.h.

108  {
109  return AutoDiffVector<
110  typename MakeCwiseBinaryOp<internal::scalar_sum_op<BaseScalar>,ValueType,OtherValueType>::Type,
111  typename MakeCwiseBinaryOp<internal::scalar_sum_op<BaseScalar>,JacobianType,OtherJacobianType>::Type >(
112  m_values + other.values(),
113  m_jacobian + other.jacobian());
114  }

◆ operator+=()

template<typename ValueType , typename JacobianType >
template<typename OtherValueType , typename OtherJacobianType >
AutoDiffVector& Eigen::AutoDiffVector< ValueType, JacobianType >::operator+= ( const AutoDiffVector< OtherValueType, OtherJacobianType > &  other)
inline

Definition at line 118 of file AutoDiffVector.h.

119  {
120  m_values += other.values();
121  m_jacobian += other.jacobian();
122  return *this;
123  }

◆ operator-() [1/2]

template<typename ValueType , typename JacobianType >
const AutoDiffVector< typename MakeCwiseUnaryOp<internal::scalar_opposite_op<Scalar>, ValueType>::Type, typename MakeCwiseUnaryOp<internal::scalar_opposite_op<Scalar>, JacobianType>::Type > Eigen::AutoDiffVector< ValueType, JacobianType >::operator- ( ) const
inline

Definition at line 150 of file AutoDiffVector.h.

151  {
152  return AutoDiffVector<
153  typename MakeCwiseUnaryOp<internal::scalar_opposite_op<Scalar>, ValueType>::Type,
154  typename MakeCwiseUnaryOp<internal::scalar_opposite_op<Scalar>, JacobianType>::Type >(
155  -m_values,
156  -m_jacobian);
157  }

◆ operator-() [2/2]

template<typename ValueType , typename JacobianType >
template<typename OtherValueType , typename OtherJacobianType >
const AutoDiffVector< typename MakeCwiseBinaryOp<internal::scalar_difference_op<Scalar>,ValueType,OtherValueType>::Type, typename MakeCwiseBinaryOp<internal::scalar_difference_op<Scalar>,JacobianType,OtherJacobianType>::Type > Eigen::AutoDiffVector< ValueType, JacobianType >::operator- ( const AutoDiffVector< OtherValueType, OtherJacobianType > &  other) const
inline

Definition at line 129 of file AutoDiffVector.h.

130  {
131  return AutoDiffVector<
132  typename MakeCwiseBinaryOp<internal::scalar_difference_op<Scalar>,ValueType,OtherValueType>::Type,
133  typename MakeCwiseBinaryOp<internal::scalar_difference_op<Scalar>,JacobianType,OtherJacobianType>::Type >(
134  m_values - other.values(),
135  m_jacobian - other.jacobian());
136  }

◆ operator-=()

template<typename ValueType , typename JacobianType >
template<typename OtherValueType , typename OtherJacobianType >
AutoDiffVector& Eigen::AutoDiffVector< ValueType, JacobianType >::operator-= ( const AutoDiffVector< OtherValueType, OtherJacobianType > &  other)
inline

Definition at line 140 of file AutoDiffVector.h.

141  {
142  m_values -= other.values();
143  m_jacobian -= other.jacobian();
144  return *this;
145  }

◆ operator=() [1/2]

template<typename ValueType , typename JacobianType >
AutoDiffVector& Eigen::AutoDiffVector< ValueType, JacobianType >::operator= ( const AutoDiffVector< ValueType, JacobianType > &  other)
inline

Definition at line 90 of file AutoDiffVector.h.

91  {
92  m_values = other.values();
93  m_jacobian = other.jacobian();
94  return *this;
95  }

◆ operator=() [2/2]

template<typename ValueType , typename JacobianType >
template<typename OtherValueType , typename OtherJacobianType >
AutoDiffVector& Eigen::AutoDiffVector< ValueType, JacobianType >::operator= ( const AutoDiffVector< OtherValueType, OtherJacobianType > &  other)
inline

Definition at line 83 of file AutoDiffVector.h.

84  {
85  m_values = other.values();
86  m_jacobian = other.jacobian();
87  return *this;
88  }

◆ operator[]() [1/2]

template<typename ValueType , typename JacobianType >
CoeffType Eigen::AutoDiffVector< ValueType, JacobianType >::operator[] ( Index  i)
inline

Definition at line 54 of file AutoDiffVector.h.

54 { return CoeffType(m_values[i], m_jacobian.col(i)); }

◆ operator[]() [2/2]

template<typename ValueType , typename JacobianType >
const CoeffType Eigen::AutoDiffVector< ValueType, JacobianType >::operator[] ( Index  i) const
inline

Definition at line 55 of file AutoDiffVector.h.

55 { return CoeffType(m_values[i], m_jacobian.col(i)); }

◆ size()

template<typename ValueType , typename JacobianType >
Index Eigen::AutoDiffVector< ValueType, JacobianType >::size ( ) const
inline

Definition at line 63 of file AutoDiffVector.h.

63 { return m_values.size(); }

◆ sum()

template<typename ValueType , typename JacobianType >
Scalar Eigen::AutoDiffVector< ValueType, JacobianType >::sum ( ) const
inline

Definition at line 66 of file AutoDiffVector.h.

66 { /*std::cerr << "sum \n\n";*/ /*std::cerr << m_jacobian.rowwise().sum() << "\n\n";*/ return Scalar(m_values.sum(), m_jacobian.rowwise().sum()); }

◆ values() [1/2]

template<typename ValueType , typename JacobianType >
ValueType& Eigen::AutoDiffVector< ValueType, JacobianType >::values ( )
inline

Definition at line 98 of file AutoDiffVector.h.

98 { return m_values; }

◆ values() [2/2]

template<typename ValueType , typename JacobianType >
const ValueType& Eigen::AutoDiffVector< ValueType, JacobianType >::values ( ) const
inline

Definition at line 97 of file AutoDiffVector.h.

97 { return m_values; }

Member Data Documentation

◆ m_jacobian

template<typename ValueType , typename JacobianType >
JacobianType Eigen::AutoDiffVector< ValueType, JacobianType >::m_jacobian
protected

Definition at line 216 of file AutoDiffVector.h.

◆ m_values

template<typename ValueType , typename JacobianType >
ValueType Eigen::AutoDiffVector< ValueType, JacobianType >::m_values
protected

Definition at line 215 of file AutoDiffVector.h.


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