mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-05 18:24:06 +08:00
AutoDiff: add one missing operator- version
This commit is contained in:
parent
3de2f4b75a
commit
a34a216e82
@ -216,6 +216,11 @@ class AutoDiffScalar
|
||||
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)
|
||||
{
|
||||
return AutoDiffScalar<DerType&>(a - b.value(), b.derivatives());
|
||||
|
Loading…
x
Reference in New Issue
Block a user