Home | History | Annotate | Download | only in AutoDiff

Lines Matching refs:other

102     AutoDiffScalar(const AutoDiffScalar<OtherDerType>& other)
103 : m_value(other.value()), m_derivatives(other.derivatives())
111 AutoDiffScalar(const AutoDiffScalar& other)
112 : m_value(other.value()), m_derivatives(other.derivatives())
116 inline AutoDiffScalar& operator=(const AutoDiffScalar<OtherDerType>& other)
118 m_value = other.value();
119 m_derivatives = other.derivatives();
123 inline AutoDiffScalar& operator=(const AutoDiffScalar& other)
125 m_value = other.value();
126 m_derivatives = other.derivatives();
139 inline bool operator< (const Scalar& other) const { return m_value < other; }
140 inline bool operator<=(const Scalar& other) const { return m_value <= other; }
141 inline bool operator> (const Scalar& other) const { return m_value > other; }
142 inline bool operator>=(const Scalar& other) const { return m_value >= other; }
143 inline bool operator==(const Scalar& other) const { return m_value == other; }
144 inline bool operator!=(const Scalar& other) const { return m_value != other; }
160 inline const AutoDiffScalar<DerType&> operator+(const Scalar& other) const
162 return AutoDiffScalar<DerType&>(m_value + other, m_derivatives);
170 // inline const AutoDiffScalar<DerType&> operator+(const Real& other) const
172 // return AutoDiffScalar<DerType&>(m_value + other, m_derivatives);
180 inline AutoDiffScalar& operator+=(const Scalar& other)
182 value() += other;
188 operator+(const AutoDiffScalar<OtherDerType>& other) const
190 internal::make_coherent(m_derivatives, other.derivatives());
192 m_value + other.value(),
193 m_derivatives + other.derivatives());
198 operator+=(const AutoDiffScalar<OtherDerType>& other)
200 (*this) = (*this) + other;
216 inline AutoDiffScalar& operator-=(const Scalar& other)
218 value() -= other;
224 operator-(const AutoDiffScalar<OtherDerType>& other) const
226 internal::make_coherent(m_derivatives, other.derivatives());
228 m_value - other.value(),
229 m_derivatives - other.derivatives());
234 operator-=(const AutoDiffScalar<OtherDerType>& other)
236 *this = *this - other;
249 operator*(const Scalar& other) const
252 m_value * other,
253 (m_derivatives * other));
257 operator*(const Scalar& other, const AutoDiffScalar& a)
260 a.value() * other,
261 a.derivatives() * other);
265 // operator*(const Real& other) const
268 // m_value * other,
269 // (m_derivatives * other));
273 // operator*(const Real& other, const AutoDiffScalar& a)
276 // a.value() * other,
277 // a.derivatives() * other);
281 operator/(const Scalar& other) const
284 m_value / other,
285 (m_derivatives * (Scalar(1)/other)));
289 operator/(const Scalar& other, const AutoDiffScalar& a)
292 other / a.value(),
293 a.derivatives() * (Scalar(-other) / (a.value()*a.value())));
297 // operator/(const Real& other) const
300 // m_value / other,
301 // (m_derivatives * (Real(1)/other)));
305 // operator/(const Real& other, const AutoDiffScalar& a)
308 // other / a.value(),
309 // a.derivatives() * (-Real(1)/other));
317 operator/(const AutoDiffScalar<OtherDerType>& other) const
319 internal::make_coherent(m_derivatives, other.derivatives());
324 m_value / other.value(),
325 ((m_derivatives * other.value()) - (m_value * other.derivatives()))
326 * (Scalar(1)/(other.value()*other.value())));
333 operator*(const AutoDiffScalar<OtherDerType>& other) const
335 internal::make_coherent(m_derivatives, other.derivatives());
339 m_value * other.value(),
340 (m_derivatives * other.value()) + (m_value * other.derivatives()));
343 inline AutoDiffScalar& operator*=(const Scalar& other)
345 *this = *this * other;
350 inline AutoDiffScalar& operator*=(const AutoDiffScalar<OtherDerType>& other)
352 *this = *this * other;
356 inline AutoDiffScalar& operator/=(const Scalar& other)
358 *this = *this / other;
363 inline AutoDiffScalar& operator/=(const AutoDiffScalar<OtherDerType>& other)
365 *this = *this / other;
400 inline const AutoDiffScalar<DerType&> operator+(const Real& other) const
402 return AutoDiffScalar<DerType&>(derived().value() + other, derived().derivatives());
410 inline AutoDiffScalar<_DerType>& operator+=(const Real& other)
412 derived().value() += other;
418 operator*(const Real& other) const
421 derived().value() * other,
422 derived().derivatives() * other);
426 operator*(const Real& other, const AutoDiffScalar<_DerType>& a)
429 a.value() * other,
430 a.derivatives() * other);
433 inline AutoDiffScalar<_DerType>& operator*=(const Scalar& other)
435 *this = *this * other;