mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
AutoDiff: add one missing operator- version
This commit is contained in:
@@ -216,6 +216,11 @@ class AutoDiffScalar
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline const AutoDiffScalar<DerType&> operator-(const Scalar& b) const
|
||||||
|
{
|
||||||
|
return AutoDiffScalar<DerType&>(m_value - b, m_derivatives);
|
||||||
|
}
|
||||||
|
|
||||||
friend inline const AutoDiffScalar<DerType&> operator-(const Scalar& a, const AutoDiffScalar& b)
|
friend inline const AutoDiffScalar<DerType&> operator-(const Scalar& a, const AutoDiffScalar& b)
|
||||||
{
|
{
|
||||||
return AutoDiffScalar<DerType&>(a - b.value(), b.derivatives());
|
return AutoDiffScalar<DerType&>(a - b.value(), b.derivatives());
|
||||||
|
|||||||
Reference in New Issue
Block a user