diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2009-12-01 13:16:51 +0100 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2009-12-01 13:16:51 +0100 |
commit | b08d5b2d2c73c095706cd2442878b960ef46df1f (patch) | |
tree | 39c0d3e24515c7f90be25b57107ac1072f18d869 /unsupported/Eigen | |
parent | 2bf354da80d15a7a1e7ad9f58f375a21c6e721aa (diff) |
Even more NestByValue cleanup...
Diffstat (limited to 'unsupported/Eigen')
-rw-r--r-- | unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h | 24 | ||||
-rw-r--r-- | unsupported/Eigen/src/AutoDiff/AutoDiffVector.h | 10 |
2 files changed, 17 insertions, 17 deletions
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h index c4607c2b8..795dd6b4d 100644 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffScalar.h @@ -212,33 +212,33 @@ class AutoDiffScalar template<typename OtherDerType> inline const AutoDiffScalar<typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, - typename MakeNestByValue<typename MakeCwiseBinaryOp<ei_scalar_difference_op<Scalar>, - typename MakeNestByValue<typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, DerType>::Type>::Type, - typename MakeNestByValue<typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, typename ei_cleantype<OtherDerType>::type>::Type>::Type >::Type >::Type >::Type > + typename MakeCwiseBinaryOp<ei_scalar_difference_op<Scalar>, + typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, DerType>::Type, + typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, typename ei_cleantype<OtherDerType>::type>::Type>::Type >::Type > operator/(const AutoDiffScalar<OtherDerType>& other) const { ei_make_coherent(m_derivatives, other.derivatives()); return AutoDiffScalar<typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, - typename MakeNestByValue<typename MakeCwiseBinaryOp<ei_scalar_difference_op<Scalar>, - typename MakeNestByValue<typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, DerType>::Type>::Type, - typename MakeNestByValue<typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, typename ei_cleantype<OtherDerType>::type>::Type>::Type >::Type >::Type >::Type >( + typename MakeCwiseBinaryOp<ei_scalar_difference_op<Scalar>, + typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, DerType>::Type, + typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, typename ei_cleantype<OtherDerType>::type>::Type>::Type >::Type >( m_value / other.value(), - ((m_derivatives * other.value()).nestByValue() - (m_value * other.derivatives()).nestByValue()).nestByValue() + ((m_derivatives * other.value()) - (m_value * other.derivatives())) * (Scalar(1)/(other.value()*other.value()))); } template<typename OtherDerType> inline const AutoDiffScalar<typename MakeCwiseBinaryOp<ei_scalar_sum_op<Scalar>, - typename MakeNestByValue<typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, DerType>::Type>::Type, - typename MakeNestByValue<typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, typename ei_cleantype<OtherDerType>::type>::Type>::Type >::Type > + typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, DerType>::Type, + typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, typename ei_cleantype<OtherDerType>::type>::Type>::Type > operator*(const AutoDiffScalar<OtherDerType>& other) const { ei_make_coherent(m_derivatives, other.derivatives()); return AutoDiffScalar<typename MakeCwiseBinaryOp<ei_scalar_sum_op<Scalar>, - typename MakeNestByValue<typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, DerType>::Type>::Type, - typename MakeNestByValue<typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, typename ei_cleantype<OtherDerType>::type>::Type>::Type >::Type >( + typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, DerType>::Type, + typename MakeCwiseUnaryOp<ei_scalar_multiple_op<Scalar>, typename ei_cleantype<OtherDerType>::type>::Type>::Type >( m_value * other.value(), - (m_derivatives * other.value()).nestByValue() + (m_value * other.derivatives()).nestByValue()); + (m_derivatives * other.value()) + (m_value * other.derivatives())); } inline AutoDiffScalar& operator*=(const Scalar& other) diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffVector.h b/unsupported/Eigen/src/AutoDiff/AutoDiffVector.h index 03c82b7e8..c0765d494 100644 --- a/unsupported/Eigen/src/AutoDiff/AutoDiffVector.h +++ b/unsupported/Eigen/src/AutoDiff/AutoDiffVector.h @@ -196,17 +196,17 @@ class AutoDiffVector // inline const AutoDiffVector< // CwiseBinaryOp<ei_scalar_multiple_op<Scalar>, ValueType, OtherValueType> // CwiseBinaryOp<ei_scalar_sum_op<Scalar>, -// NestByValue<CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, JacobianType> >, -// NestByValue<CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, OtherJacobianType> > > > +// CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, JacobianType>, +// CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, OtherJacobianType> > > // operator*(const AutoDiffVector<OtherValueType,OtherJacobianType>& other) const // { // return AutoDiffVector< // CwiseBinaryOp<ei_scalar_multiple_op<Scalar>, ValueType, OtherValueType> // CwiseBinaryOp<ei_scalar_sum_op<Scalar>, -// NestByValue<CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, JacobianType> >, -// NestByValue<CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, OtherJacobianType> > > >( +// CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, JacobianType>, +// CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, OtherJacobianType> > >( // m_values.cwise() * other.values(), -// (m_jacobian * other.values()).nestByValue() + (m_values * other.jacobian()).nestByValue()); +// (m_jacobian * other.values()) + (m_values * other.jacobian())); // } inline AutoDiffVector& operator*=(const Scalar& other) |