mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
merge
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -2,6 +2,6 @@ ADD_SUBDIRECTORY(IterativeSolvers)
|
||||
ADD_SUBDIRECTORY(BVH)
|
||||
ADD_SUBDIRECTORY(AutoDiff)
|
||||
ADD_SUBDIRECTORY(MoreVectorization)
|
||||
ADD_SUBDIRECTORY(FFT)
|
||||
ADD_SUBDIRECTORY(Skyline)
|
||||
# ADD_SUBDIRECTORY(FFT)
|
||||
# ADD_SUBDIRECTORY(Skyline)
|
||||
ADD_SUBDIRECTORY(MatrixFunctions)
|
||||
|
||||
Reference in New Issue
Block a user