Lines Matching full:scalar
36 inline AutoDiffScalar<NewDerType> MakeAutoDiffScalar(const typename NewDerType::Scalar& value, cons… in MakeAutoDiffScalar()
41 * \brief A scalar type replacement with automatic differentation capability
43 * \param _DerType the vector type used to store/represent the derivatives. The base scalar type
52 …* This class represents a scalar value while tracking its respective derivatives using Eigen's exp…
60 * AutoDiffScalar can be used as the scalar type of an Eigen::Matrix object. However,
69 …internal::is_same<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar,
70 …ts<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar>::Real>::value>
74 …internal::is_same<typename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar,
75 …ypename internal::traits<typename internal::remove_all<_DerType>::type>::Scalar>::Real>::value> Ba…
77 typedef typename internal::traits<DerType>::Scalar Scalar; typedef
78 typedef typename NumTraits<Scalar>::Real Real;
86 /** Constructs an active scalar from its \a value,
88 AutoDiffScalar(const Scalar& value, int nbDer, int derNumber) in AutoDiffScalar()
91 m_derivatives.coeffRef(derNumber) = Scalar(1); in AutoDiffScalar()
94 /** Conversion from a scalar constant to an active scalar.
103 /** Constructs an active scalar from its \a value and derivatives \a der */
104 AutoDiffScalar(const Scalar& value, const DerType& der) in AutoDiffScalar()
111 …::enable_if<internal::is_same<Scalar, typename internal::traits<typename internal::remove_all<Othe…
141 inline AutoDiffScalar& operator=(const Scalar& other)
149 // inline operator const Scalar& () const { return m_value; }
150 // inline operator Scalar& () { return m_value; }
152 inline const Scalar& value() const { return m_value; } in value()
153 inline Scalar& value() { return m_value; } in value()
158 inline bool operator< (const Scalar& other) const { return m_value < other; }
159 inline bool operator<=(const Scalar& other) const { return m_value <= other; }
160 inline bool operator> (const Scalar& other) const { return m_value > other; }
161 inline bool operator>=(const Scalar& other) const { return m_value >= other; }
162 inline bool operator==(const Scalar& other) const { return m_value == other; }
163 inline bool operator!=(const Scalar& other) const { return m_value != other; }
165 … friend inline bool operator< (const Scalar& a, const AutoDiffScalar& b) { return a < b.value(); }
166 … friend inline bool operator<=(const Scalar& a, const AutoDiffScalar& b) { return a <= b.value(); }
167 … friend inline bool operator> (const Scalar& a, const AutoDiffScalar& b) { return a > b.value(); }
168 … friend inline bool operator>=(const Scalar& a, const AutoDiffScalar& b) { return a >= b.value(); }
169 … friend inline bool operator==(const Scalar& a, const AutoDiffScalar& b) { return a == b.value(); }
170 … friend inline bool operator!=(const Scalar& a, const AutoDiffScalar& b) { return a != b.value(); }
179 inline const AutoDiffScalar<DerType&> operator+(const Scalar& other) const
184 friend inline const AutoDiffScalar<DerType&> operator+(const Scalar& a, const AutoDiffScalar& b)
199 inline AutoDiffScalar& operator+=(const Scalar& other)
206 …inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>,const DerType,const type…
210 …return AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>,const DerType,const typename i…
223 inline const AutoDiffScalar<DerType&> operator-(const Scalar& b) const
228 …friend inline const AutoDiffScalar<CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const DerTyp…
229 operator-(const Scalar& a, const AutoDiffScalar& b)
231 return AutoDiffScalar<CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const DerType> >
235 inline AutoDiffScalar& operator-=(const Scalar& other)
242 …inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_difference_op<Scalar>, const DerType,co…
246 …return AutoDiffScalar<CwiseBinaryOp<internal::scalar_difference_op<Scalar>, const DerType,const ty…
259 inline const AutoDiffScalar<CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const DerType> >
262 return AutoDiffScalar<CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const DerType> >(
267 inline const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product) >
268 operator*(const Scalar& other) const
273 …friend inline const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product) >
274 operator*(const Scalar& other, const AutoDiffScalar& a)
295 inline const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product) >
296 operator/(const Scalar& other) const
298 return MakeAutoDiffScalar(m_value / other, (m_derivatives * (Scalar(1)/other)));
301 …friend inline const AutoDiffScalar<EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product) >
302 operator/(const Scalar& other, const AutoDiffScalar& a)
304 …return MakeAutoDiffScalar(other / a.value(), a.derivatives() * (Scalar(-other) / (a.value()*a.valu…
325 CwiseBinaryOp<internal::scalar_difference_op<Scalar> EIGEN_COMMA
326 const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product) EIGEN_COMMA
327 …R_RETURN_TYPE(typename internal::remove_all<OtherDerType>::type,Scalar,product) >,Scalar,product) >
334 * (Scalar(1)/(other.value()*other.value())));
338 inline const AutoDiffScalar<CwiseBinaryOp<internal::scalar_sum_op<Scalar>,
339 const EIGEN_EXPR_BINARYOP_SCALAR_RETURN_TYPE(DerType,Scalar,product),
340 …R_BINARYOP_SCALAR_RETURN_TYPE(typename internal::remove_all<OtherDerType>::type,Scalar,product) > >
349 inline AutoDiffScalar& operator*=(const Scalar& other)
362 inline AutoDiffScalar& operator/=(const Scalar& other)
376 Scalar m_value;
385 // : auto_diff_scalar_op<_DerType, typename NumTraits<Scalar>::Real,
386 // is_same<Scalar,typename NumTraits<Scalar>::Real>::value>
389 typedef typename traits<DerType>::Scalar Scalar;
390 typedef typename NumTraits<Scalar>::Real Real;
392 // typedef auto_diff_scalar_op<_DerType, typename NumTraits<Scalar>::Real,
393 // is_same<Scalar,typename NumTraits<Scalar>::Real>::value> Base;
423 …inline const AutoDiffScalar<typename CwiseUnaryOp<bind2nd_op<scalar_product_op<Scalar,Real> >, Der…
426 …return AutoDiffScalar<typename CwiseUnaryOp<bind2nd_op<scalar_product_op<Scalar,Real> >, DerType>:…
431 …friend inline const AutoDiffScalar<typename CwiseUnaryOp<bind1st_op<scalar_product_op<Real,Scalar>…
434 …return AutoDiffScalar<typename CwiseUnaryOp<bind1st_op<scalar_product_op<Real,Scalar> >, DerType>:…
439 inline AutoDiffScalar<_DerType>& operator*=(const Scalar& other)
501 struct ScalarBinaryOpTraits<AutoDiffScalar<DerType>,typename DerType::Scalar,BinOp>
507 struct ScalarBinaryOpTraits<typename DerType::Scalar,AutoDiffScalar<DerType>, BinOp>
525 // enum { Defined = 1 };//internal::is_same<typename DerType1::Scalar,typename DerType2::Scalar>:…
532 … Eigen::internal::traits<typename Eigen::internal::remove_all<DerType>::type>::Scalar, product) > \
535 …name Eigen::internal::traits<typename Eigen::internal::remove_all<DerType>::type>::Scalar Scalar; \
544 inline typename DerType::Scalar imag(const AutoDiffScalar<DerType>&) { return 0.; }
581 return Eigen::MakeAutoDiffScalar(abs2(x.value()), x.derivatives() * (Scalar(2)*x.value()));)
585 Scalar sqrtx = sqrt(x.value());
586 return Eigen::MakeAutoDiffScalar(sqrtx,x.derivatives() * (Scalar(0.5) / sqrtx));)
600 Scalar expx = exp(x.value());
605 return Eigen::MakeAutoDiffScalar(log(x.value()),x.derivatives() * (Scalar(1)/x.value()));)
609 …e>::type,typename internal::traits<typename internal::remove_all<DerType>::type>::Scalar,product) >
610 …Type> &x, const typename internal::traits<typename internal::remove_all<DerType>::type>::Scalar &y)
619 …atrix<typename internal::traits<typename internal::remove_all<DerTypeA>::type>::Scalar,Dynamic,1> >
623 typedef typename internal::traits<typename internal::remove_all<DerTypeA>::type>::Scalar Scalar;
624 typedef AutoDiffScalar<Matrix<Scalar,Dynamic,1> > PlainADS;
628 Scalar squared_hypot = a.value() * a.value() + b.value() * b.value();
639 …return Eigen::MakeAutoDiffScalar(tan(x.value()),x.derivatives() * (Scalar(1)/numext::abs2(cos(x.va…
644 …return Eigen::MakeAutoDiffScalar(asin(x.value()),x.derivatives() * (Scalar(1)/sqrt(1-numext::abs2(…
649 …return Eigen::MakeAutoDiffScalar(acos(x.value()),x.derivatives() * (Scalar(-1)/sqrt(1-numext::abs2…
654 …return Eigen::MakeAutoDiffScalar(tanh(x.value()),x.derivatives() * (Scalar(1)/numext::abs2(cosh(x.…
669 : NumTraits< typename NumTraits<typename internal::remove_all<DerType>::type::Scalar>::Real >
672 …typedef AutoDiffScalar<Matrix<typename NumTraits<typename DerTypeCleaned::Scalar>::Real,DerTypeCle…
676 typedef typename NumTraits<typename DerTypeCleaned::Scalar>::Literal Literal;