mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
const-qualify template parameters representing const arguments to expressions.
needed to fix docs compile issue.
This commit is contained in:
parent
5331fa3033
commit
c3a4f6b5c5
@ -71,7 +71,7 @@ class DiagonalBase : public EigenBase<Derived>
|
|||||||
const DiagonalProduct<MatrixDerived, Derived, OnTheLeft>
|
const DiagonalProduct<MatrixDerived, Derived, OnTheLeft>
|
||||||
operator*(const MatrixBase<MatrixDerived> &matrix) const;
|
operator*(const MatrixBase<MatrixDerived> &matrix) const;
|
||||||
|
|
||||||
inline const DiagonalWrapper<CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, DiagonalVectorType> >
|
inline const DiagonalWrapper<CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const DiagonalVectorType> >
|
||||||
inverse() const
|
inverse() const
|
||||||
{
|
{
|
||||||
return diagonal().cwiseInverse();
|
return diagonal().cwiseInverse();
|
||||||
|
@ -755,7 +755,7 @@ MatrixBase<Derived>::triangularView() const
|
|||||||
/** \returns true if *this is approximately equal to an upper triangular matrix,
|
/** \returns true if *this is approximately equal to an upper triangular matrix,
|
||||||
* within the precision given by \a prec.
|
* within the precision given by \a prec.
|
||||||
*
|
*
|
||||||
* \sa isLowerTriangular(), extract(), part(), marked()
|
* \sa isLowerTriangular()
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
bool MatrixBase<Derived>::isUpperTriangular(RealScalar prec) const
|
bool MatrixBase<Derived>::isUpperTriangular(RealScalar prec) const
|
||||||
@ -780,7 +780,7 @@ bool MatrixBase<Derived>::isUpperTriangular(RealScalar prec) const
|
|||||||
/** \returns true if *this is approximately equal to a lower triangular matrix,
|
/** \returns true if *this is approximately equal to a lower triangular matrix,
|
||||||
* within the precision given by \a prec.
|
* within the precision given by \a prec.
|
||||||
*
|
*
|
||||||
* \sa isUpperTriangular(), extract(), part(), marked()
|
* \sa isUpperTriangular()
|
||||||
*/
|
*/
|
||||||
template<typename Derived>
|
template<typename Derived>
|
||||||
bool MatrixBase<Derived>::isLowerTriangular(RealScalar prec) const
|
bool MatrixBase<Derived>::isLowerTriangular(RealScalar prec) const
|
||||||
|
@ -447,8 +447,8 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
|
|||||||
/** Returns the expression of the sum of the vector \a other to each subvector of \c *this */
|
/** Returns the expression of the sum of the vector \a other to each subvector of \c *this */
|
||||||
template<typename OtherDerived> EIGEN_STRONG_INLINE
|
template<typename OtherDerived> EIGEN_STRONG_INLINE
|
||||||
CwiseBinaryOp<internal::scalar_sum_op<Scalar>,
|
CwiseBinaryOp<internal::scalar_sum_op<Scalar>,
|
||||||
ExpressionTypeNestedCleaned,
|
const ExpressionTypeNestedCleaned,
|
||||||
typename ExtendedType<OtherDerived>::Type>
|
const typename ExtendedType<OtherDerived>::Type>
|
||||||
operator+(const DenseBase<OtherDerived>& other) const
|
operator+(const DenseBase<OtherDerived>& other) const
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived);
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived);
|
||||||
@ -458,8 +458,8 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
|
|||||||
/** Returns the expression of the difference between each subvector of \c *this and the vector \a other */
|
/** Returns the expression of the difference between each subvector of \c *this and the vector \a other */
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
CwiseBinaryOp<internal::scalar_difference_op<Scalar>,
|
CwiseBinaryOp<internal::scalar_difference_op<Scalar>,
|
||||||
ExpressionTypeNestedCleaned,
|
const ExpressionTypeNestedCleaned,
|
||||||
typename ExtendedType<OtherDerived>::Type>
|
const typename ExtendedType<OtherDerived>::Type>
|
||||||
operator-(const DenseBase<OtherDerived>& other) const
|
operator-(const DenseBase<OtherDerived>& other) const
|
||||||
{
|
{
|
||||||
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived);
|
EIGEN_STATIC_ASSERT_VECTOR_ONLY(OtherDerived);
|
||||||
|
@ -342,10 +342,10 @@
|
|||||||
|
|
||||||
#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD,FUNCTOR) \
|
#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD,FUNCTOR) \
|
||||||
template<typename OtherDerived> \
|
template<typename OtherDerived> \
|
||||||
EIGEN_STRONG_INLINE const CwiseBinaryOp<FUNCTOR<Scalar>, Derived, OtherDerived> \
|
EIGEN_STRONG_INLINE const CwiseBinaryOp<FUNCTOR<Scalar>, const Derived, const OtherDerived> \
|
||||||
METHOD(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
|
METHOD(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
|
||||||
{ \
|
{ \
|
||||||
return CwiseBinaryOp<FUNCTOR<Scalar>, Derived, OtherDerived>(derived(), other.derived()); \
|
return CwiseBinaryOp<FUNCTOR<Scalar>, const Derived, const OtherDerived>(derived(), other.derived()); \
|
||||||
}
|
}
|
||||||
|
|
||||||
// the expression type of a cwise product
|
// the expression type of a cwise product
|
||||||
@ -355,8 +355,8 @@
|
|||||||
typename internal::traits<LHS>::Scalar, \
|
typename internal::traits<LHS>::Scalar, \
|
||||||
typename internal::traits<RHS>::Scalar \
|
typename internal::traits<RHS>::Scalar \
|
||||||
>, \
|
>, \
|
||||||
LHS, \
|
const LHS, \
|
||||||
RHS \
|
const RHS \
|
||||||
>
|
>
|
||||||
|
|
||||||
#endif // EIGEN_MACROS_H
|
#endif // EIGEN_MACROS_H
|
||||||
|
@ -121,7 +121,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
|||||||
|
|
||||||
/** \returns the center of the box */
|
/** \returns the center of the box */
|
||||||
inline const CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>,
|
inline const CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>,
|
||||||
CwiseBinaryOp<internal::scalar_sum_op<Scalar>, VectorType, VectorType> >
|
const CwiseBinaryOp<internal::scalar_sum_op<Scalar>, const VectorType, const VectorType> >
|
||||||
center() const
|
center() const
|
||||||
{ return (m_min+m_max)/2; }
|
{ return (m_min+m_max)/2; }
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
|||||||
* Note that this function does not get the same
|
* Note that this function does not get the same
|
||||||
* result for integral or floating scalar types: see
|
* result for integral or floating scalar types: see
|
||||||
*/
|
*/
|
||||||
inline const CwiseBinaryOp< internal::scalar_difference_op<Scalar>, VectorType, VectorType> sizes() const
|
inline const CwiseBinaryOp< internal::scalar_difference_op<Scalar>, const VectorType, const VectorType> sizes() const
|
||||||
{ return m_max - m_min; }
|
{ return m_max - m_min; }
|
||||||
|
|
||||||
/** \returns the volume of the bounding box */
|
/** \returns the volume of the bounding box */
|
||||||
@ -140,7 +140,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
|
|||||||
* if the length of the diagonal is needed: diagonal().norm()
|
* if the length of the diagonal is needed: diagonal().norm()
|
||||||
* will provide it.
|
* will provide it.
|
||||||
*/
|
*/
|
||||||
inline CwiseBinaryOp< internal::scalar_difference_op<Scalar>, VectorType, VectorType> diagonal() const
|
inline CwiseBinaryOp< internal::scalar_difference_op<Scalar>, const VectorType, const VectorType> diagonal() const
|
||||||
{ return sizes(); }
|
{ return sizes(); }
|
||||||
|
|
||||||
/** \returns the vertex of the bounding box at the corner defined by
|
/** \returns the vertex of the bounding box at the corner defined by
|
||||||
|
@ -14,10 +14,10 @@ operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
|||||||
* \sa MatrixBase::cwiseQuotient
|
* \sa MatrixBase::cwiseQuotient
|
||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, Derived, OtherDerived>
|
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>
|
||||||
operator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
operator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
||||||
{
|
{
|
||||||
return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, Derived, OtherDerived>(derived(), other.derived());
|
return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of the coefficient-wise min of \c *this and \a other
|
/** \returns an expression of the coefficient-wise min of \c *this and \a other
|
||||||
@ -111,13 +111,13 @@ EIGEN_MAKE_CWISE_BINARY_OP(operator!=,std::not_equal_to)
|
|||||||
*
|
*
|
||||||
* \sa operator+=(), operator-()
|
* \sa operator+=(), operator-()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
|
||||||
operator+(const Scalar& scalar) const
|
operator+(const Scalar& scalar) const
|
||||||
{
|
{
|
||||||
return CwiseUnaryOp<internal::scalar_add_op<Scalar>, Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
|
return CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>(derived(), internal::scalar_add_op<Scalar>(scalar));
|
||||||
}
|
}
|
||||||
|
|
||||||
friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, Derived>
|
friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
|
||||||
operator+(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
|
operator+(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
|
||||||
{
|
{
|
||||||
return other + scalar;
|
return other + scalar;
|
||||||
@ -130,13 +130,13 @@ operator+(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>&
|
|||||||
*
|
*
|
||||||
* \sa operator+(), operator-=()
|
* \sa operator+(), operator-=()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, const Derived>
|
||||||
operator-(const Scalar& scalar) const
|
operator-(const Scalar& scalar) const
|
||||||
{
|
{
|
||||||
return *this + (-scalar);
|
return *this + (-scalar);
|
||||||
}
|
}
|
||||||
|
|
||||||
friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, CwiseUnaryOp<internal::scalar_opposite_op<Scalar>,Derived> >
|
friend inline const CwiseUnaryOp<internal::scalar_add_op<Scalar>, CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const Derived> >
|
||||||
operator-(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
|
operator-(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
|
||||||
{
|
{
|
||||||
return (-other) + scalar;
|
return (-other) + scalar;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
* \sa abs2()
|
* \sa abs2()
|
||||||
*/
|
*/
|
||||||
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs_op<Scalar>, Derived>
|
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived>
|
||||||
abs() const
|
abs() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
@ -20,7 +20,7 @@ abs() const
|
|||||||
*
|
*
|
||||||
* \sa abs(), square()
|
* \sa abs(), square()
|
||||||
*/
|
*/
|
||||||
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, Derived>
|
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived>
|
||||||
abs2() const
|
abs2() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
@ -33,7 +33,7 @@ abs2() const
|
|||||||
*
|
*
|
||||||
* \sa pow(), log(), sin(), cos()
|
* \sa pow(), log(), sin(), cos()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_exp_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_exp_op<Scalar>, const Derived>
|
||||||
exp() const
|
exp() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
@ -46,7 +46,7 @@ exp() const
|
|||||||
*
|
*
|
||||||
* \sa exp()
|
* \sa exp()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_log_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_log_op<Scalar>, const Derived>
|
||||||
log() const
|
log() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
@ -59,7 +59,7 @@ log() const
|
|||||||
*
|
*
|
||||||
* \sa pow(), square()
|
* \sa pow(), square()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived>
|
||||||
sqrt() const
|
sqrt() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
@ -72,7 +72,7 @@ sqrt() const
|
|||||||
*
|
*
|
||||||
* \sa sin(), exp()
|
* \sa sin(), exp()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_cos_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_cos_op<Scalar>, const Derived>
|
||||||
cos() const
|
cos() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
@ -86,7 +86,7 @@ cos() const
|
|||||||
*
|
*
|
||||||
* \sa cos(), exp()
|
* \sa cos(), exp()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_sin_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_sin_op<Scalar>, const Derived>
|
||||||
sin() const
|
sin() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
@ -100,10 +100,10 @@ sin() const
|
|||||||
*
|
*
|
||||||
* \sa exp(), log()
|
* \sa exp(), log()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_pow_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_pow_op<Scalar>, const Derived>
|
||||||
pow(const Scalar& exponent) const
|
pow(const Scalar& exponent) const
|
||||||
{
|
{
|
||||||
return CwiseUnaryOp<internal::scalar_pow_op<Scalar>,Derived>
|
return CwiseUnaryOp<internal::scalar_pow_op<Scalar>, const Derived>
|
||||||
(derived(), internal::scalar_pow_op<Scalar>(exponent));
|
(derived(), internal::scalar_pow_op<Scalar>(exponent));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ pow(const Scalar& exponent) const
|
|||||||
*
|
*
|
||||||
* \sa operator/(), operator*()
|
* \sa operator/(), operator*()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived>
|
||||||
inverse() const
|
inverse() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
@ -128,7 +128,7 @@ inverse() const
|
|||||||
*
|
*
|
||||||
* \sa operator/(), operator*(), abs2()
|
* \sa operator/(), operator*(), abs2()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_square_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_square_op<Scalar>, const Derived>
|
||||||
square() const
|
square() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
@ -141,16 +141,16 @@ square() const
|
|||||||
*
|
*
|
||||||
* \sa square(), pow()
|
* \sa square(), pow()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_cube_op<Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_cube_op<Scalar>, const Derived>
|
||||||
cube() const
|
cube() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(METHOD_NAME,FUNCTOR) \
|
#define EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(METHOD_NAME,FUNCTOR) \
|
||||||
inline const CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >,Derived> \
|
inline const CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >, const Derived> \
|
||||||
METHOD_NAME(const Scalar& s) const { \
|
METHOD_NAME(const Scalar& s) const { \
|
||||||
return CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >,Derived> \
|
return CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >, const Derived> \
|
||||||
(derived(), std::bind2nd(FUNCTOR<Scalar>(), s)); \
|
(derived(), std::bind2nd(FUNCTOR<Scalar>(), s)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,9 +53,9 @@ EIGEN_MAKE_CWISE_BINARY_OP(operator+,internal::scalar_sum_op)
|
|||||||
* \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct()
|
* \sa class CwiseBinaryOp, operator+(), operator-(), cwiseProduct()
|
||||||
*/
|
*/
|
||||||
template<typename CustomBinaryOp, typename OtherDerived>
|
template<typename CustomBinaryOp, typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE const CwiseBinaryOp<CustomBinaryOp, Derived, OtherDerived>
|
EIGEN_STRONG_INLINE const CwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>
|
||||||
binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other, const CustomBinaryOp& func = CustomBinaryOp()) const
|
binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other, const CustomBinaryOp& func = CustomBinaryOp()) const
|
||||||
{
|
{
|
||||||
return CwiseBinaryOp<CustomBinaryOp, Derived, OtherDerived>(derived(), other.derived(), func);
|
return CwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>(derived(), other.derived(), func);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,17 +28,17 @@
|
|||||||
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
#ifndef EIGEN_PARSED_BY_DOXYGEN
|
||||||
|
|
||||||
/** \internal Represents a scalar multiple of an expression */
|
/** \internal Represents a scalar multiple of an expression */
|
||||||
typedef CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, Derived> ScalarMultipleReturnType;
|
typedef CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, const Derived> ScalarMultipleReturnType;
|
||||||
/** \internal Represents a quotient of an expression by a scalar*/
|
/** \internal Represents a quotient of an expression by a scalar*/
|
||||||
typedef CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, Derived> ScalarQuotient1ReturnType;
|
typedef CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, const Derived> ScalarQuotient1ReturnType;
|
||||||
/** \internal the return type of conjugate() */
|
/** \internal the return type of conjugate() */
|
||||||
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||||
const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Derived>,
|
const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, const Derived>,
|
||||||
const Derived&
|
const Derived&
|
||||||
>::type ConjugateReturnType;
|
>::type ConjugateReturnType;
|
||||||
/** \internal the return type of real() const */
|
/** \internal the return type of real() const */
|
||||||
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
||||||
const CwiseUnaryOp<internal::scalar_real_op<Scalar>, Derived>,
|
const CwiseUnaryOp<internal::scalar_real_op<Scalar>, const Derived>,
|
||||||
const Derived&
|
const Derived&
|
||||||
>::type RealReturnType;
|
>::type RealReturnType;
|
||||||
/** \internal the return type of real() */
|
/** \internal the return type of real() */
|
||||||
@ -47,7 +47,7 @@ typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
|
|||||||
Derived&
|
Derived&
|
||||||
>::type NonConstRealReturnType;
|
>::type NonConstRealReturnType;
|
||||||
/** \internal the return type of imag() const */
|
/** \internal the return type of imag() const */
|
||||||
typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>, Derived> ImagReturnType;
|
typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>, const Derived> ImagReturnType;
|
||||||
/** \internal the return type of imag() */
|
/** \internal the return type of imag() */
|
||||||
typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstImagReturnType;
|
typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstImagReturnType;
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstIm
|
|||||||
|
|
||||||
/** \returns an expression of the opposite of \c *this
|
/** \returns an expression of the opposite of \c *this
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_opposite_op<typename internal::traits<Derived>::Scalar>,Derived>
|
inline const CwiseUnaryOp<internal::scalar_opposite_op<typename internal::traits<Derived>::Scalar>, const Derived>
|
||||||
operator-() const { return derived(); }
|
operator-() const { return derived(); }
|
||||||
|
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ operator-() const { return derived(); }
|
|||||||
inline const ScalarMultipleReturnType
|
inline const ScalarMultipleReturnType
|
||||||
operator*(const Scalar& scalar) const
|
operator*(const Scalar& scalar) const
|
||||||
{
|
{
|
||||||
return CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, Derived>
|
return CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, const Derived>
|
||||||
(derived(), internal::scalar_multiple_op<Scalar>(scalar));
|
(derived(), internal::scalar_multiple_op<Scalar>(scalar));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,18 +72,18 @@ const ScalarMultipleReturnType operator*(const RealScalar& scalar) const;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** \returns an expression of \c *this divided by the scalar value \a scalar */
|
/** \returns an expression of \c *this divided by the scalar value \a scalar */
|
||||||
inline const CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>, Derived>
|
inline const CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>, const Derived>
|
||||||
operator/(const Scalar& scalar) const
|
operator/(const Scalar& scalar) const
|
||||||
{
|
{
|
||||||
return CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, Derived>
|
return CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, const Derived>
|
||||||
(derived(), internal::scalar_quotient1_op<Scalar>(scalar));
|
(derived(), internal::scalar_quotient1_op<Scalar>(scalar));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Overloaded for efficient real matrix times complex scalar value */
|
/** Overloaded for efficient real matrix times complex scalar value */
|
||||||
inline const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, Derived>
|
inline const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived>
|
||||||
operator*(const std::complex<Scalar>& scalar) const
|
operator*(const std::complex<Scalar>& scalar) const
|
||||||
{
|
{
|
||||||
return CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, Derived>
|
return CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived>
|
||||||
(*static_cast<const Derived*>(this), internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >(scalar));
|
(*static_cast<const Derived*>(this), internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >(scalar));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ inline friend const ScalarMultipleReturnType
|
|||||||
operator*(const Scalar& scalar, const StorageBaseType& matrix)
|
operator*(const Scalar& scalar, const StorageBaseType& matrix)
|
||||||
{ return matrix*scalar; }
|
{ return matrix*scalar; }
|
||||||
|
|
||||||
inline friend const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, Derived>
|
inline friend const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived>
|
||||||
operator*(const std::complex<Scalar>& scalar, const StorageBaseType& matrix)
|
operator*(const std::complex<Scalar>& scalar, const StorageBaseType& matrix)
|
||||||
{ return matrix*scalar; }
|
{ return matrix*scalar; }
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ operator*(const std::complex<Scalar>& scalar, const StorageBaseType& matrix)
|
|||||||
* \sa class CwiseUnaryOp
|
* \sa class CwiseUnaryOp
|
||||||
*/
|
*/
|
||||||
template<typename NewType>
|
template<typename NewType>
|
||||||
typename internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typename internal::traits<Derived>::Scalar, NewType>, Derived> >::type
|
typename internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typename internal::traits<Derived>::Scalar, NewType>, const Derived> >::type
|
||||||
cast() const
|
cast() const
|
||||||
{
|
{
|
||||||
return derived();
|
return derived();
|
||||||
@ -150,10 +150,10 @@ imag() const { return derived(); }
|
|||||||
* \sa class CwiseUnaryOp, class CwiseBinaryOp
|
* \sa class CwiseUnaryOp, class CwiseBinaryOp
|
||||||
*/
|
*/
|
||||||
template<typename CustomUnaryOp>
|
template<typename CustomUnaryOp>
|
||||||
inline const CwiseUnaryOp<CustomUnaryOp, Derived>
|
inline const CwiseUnaryOp<CustomUnaryOp, const Derived>
|
||||||
unaryExpr(const CustomUnaryOp& func = CustomUnaryOp()) const
|
unaryExpr(const CustomUnaryOp& func = CustomUnaryOp()) const
|
||||||
{
|
{
|
||||||
return CwiseUnaryOp<CustomUnaryOp, Derived>(derived(), func);
|
return CwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of a custom coefficient-wise unary operator \a func of *this
|
/** \returns an expression of a custom coefficient-wise unary operator \a func of *this
|
||||||
@ -168,10 +168,10 @@ unaryExpr(const CustomUnaryOp& func = CustomUnaryOp()) const
|
|||||||
* \sa class CwiseUnaryOp, class CwiseBinaryOp
|
* \sa class CwiseUnaryOp, class CwiseBinaryOp
|
||||||
*/
|
*/
|
||||||
template<typename CustomViewOp>
|
template<typename CustomViewOp>
|
||||||
inline const CwiseUnaryView<CustomViewOp, Derived>
|
inline const CwiseUnaryView<CustomViewOp, const Derived>
|
||||||
unaryViewExpr(const CustomViewOp& func = CustomViewOp()) const
|
unaryViewExpr(const CustomViewOp& func = CustomViewOp()) const
|
||||||
{
|
{
|
||||||
return CwiseUnaryView<CustomViewOp, Derived>(derived(), func);
|
return CwiseUnaryView<CustomViewOp, const Derived>(derived(), func);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns a non const expression of the real part of \c *this.
|
/** \returns a non const expression of the real part of \c *this.
|
||||||
|
@ -52,10 +52,10 @@ cwiseProduct(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
|||||||
* \sa cwiseNotEqual(), isApprox(), isMuchSmallerThan()
|
* \sa cwiseNotEqual(), isApprox(), isMuchSmallerThan()
|
||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline const CwiseBinaryOp<std::equal_to<Scalar>, Derived, OtherDerived>
|
inline const CwiseBinaryOp<std::equal_to<Scalar>, const Derived, const OtherDerived>
|
||||||
cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
||||||
{
|
{
|
||||||
return CwiseBinaryOp<std::equal_to<Scalar>, Derived, OtherDerived>(derived(), other.derived());
|
return CwiseBinaryOp<std::equal_to<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of the coefficient-wise != operator of *this and \a other
|
/** \returns an expression of the coefficient-wise != operator of *this and \a other
|
||||||
@ -71,10 +71,10 @@ cwiseEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
|||||||
* \sa cwiseEqual(), isApprox(), isMuchSmallerThan()
|
* \sa cwiseEqual(), isApprox(), isMuchSmallerThan()
|
||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
inline const CwiseBinaryOp<std::not_equal_to<Scalar>, Derived, OtherDerived>
|
inline const CwiseBinaryOp<std::not_equal_to<Scalar>, const Derived, const OtherDerived>
|
||||||
cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
||||||
{
|
{
|
||||||
return CwiseBinaryOp<std::not_equal_to<Scalar>, Derived, OtherDerived>(derived(), other.derived());
|
return CwiseBinaryOp<std::not_equal_to<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of the coefficient-wise min of *this and \a other
|
/** \returns an expression of the coefficient-wise min of *this and \a other
|
||||||
@ -85,10 +85,10 @@ cwiseNotEqual(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
|||||||
* \sa class CwiseBinaryOp, max()
|
* \sa class CwiseBinaryOp, max()
|
||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar>, Derived, OtherDerived>
|
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived, const OtherDerived>
|
||||||
cwiseMin(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
cwiseMin(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
||||||
{
|
{
|
||||||
return CwiseBinaryOp<internal::scalar_min_op<Scalar>, Derived, OtherDerived>(derived(), other.derived());
|
return CwiseBinaryOp<internal::scalar_min_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of the coefficient-wise max of *this and \a other
|
/** \returns an expression of the coefficient-wise max of *this and \a other
|
||||||
@ -99,10 +99,10 @@ cwiseMin(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
|||||||
* \sa class CwiseBinaryOp, min()
|
* \sa class CwiseBinaryOp, min()
|
||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar>, Derived, OtherDerived>
|
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived, const OtherDerived>
|
||||||
cwiseMax(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
cwiseMax(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
||||||
{
|
{
|
||||||
return CwiseBinaryOp<internal::scalar_max_op<Scalar>, Derived, OtherDerived>(derived(), other.derived());
|
return CwiseBinaryOp<internal::scalar_max_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \returns an expression of the coefficient-wise quotient of *this and \a other
|
/** \returns an expression of the coefficient-wise quotient of *this and \a other
|
||||||
@ -113,8 +113,8 @@ cwiseMax(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
|||||||
* \sa class CwiseBinaryOp, cwiseProduct(), cwiseInverse()
|
* \sa class CwiseBinaryOp, cwiseProduct(), cwiseInverse()
|
||||||
*/
|
*/
|
||||||
template<typename OtherDerived>
|
template<typename OtherDerived>
|
||||||
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, Derived, OtherDerived>
|
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>
|
||||||
cwiseQuotient(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
cwiseQuotient(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
|
||||||
{
|
{
|
||||||
return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, Derived, OtherDerived>(derived(), other.derived());
|
return CwiseBinaryOp<internal::scalar_quotient_op<Scalar>, const Derived, const OtherDerived>(derived(), other.derived());
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
*
|
*
|
||||||
* \sa cwiseAbs2()
|
* \sa cwiseAbs2()
|
||||||
*/
|
*/
|
||||||
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs_op<Scalar>,Derived>
|
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived>
|
||||||
cwiseAbs() const { return derived(); }
|
cwiseAbs() const { return derived(); }
|
||||||
|
|
||||||
/** \returns an expression of the coefficient-wise squared absolute value of \c *this
|
/** \returns an expression of the coefficient-wise squared absolute value of \c *this
|
||||||
@ -42,7 +42,7 @@ cwiseAbs() const { return derived(); }
|
|||||||
*
|
*
|
||||||
* \sa cwiseAbs()
|
* \sa cwiseAbs()
|
||||||
*/
|
*/
|
||||||
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>,Derived>
|
EIGEN_STRONG_INLINE const CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived>
|
||||||
cwiseAbs2() const { return derived(); }
|
cwiseAbs2() const { return derived(); }
|
||||||
|
|
||||||
/** \returns an expression of the coefficient-wise square root of *this.
|
/** \returns an expression of the coefficient-wise square root of *this.
|
||||||
@ -52,7 +52,7 @@ cwiseAbs2() const { return derived(); }
|
|||||||
*
|
*
|
||||||
* \sa cwisePow(), cwiseSquare()
|
* \sa cwisePow(), cwiseSquare()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>,Derived>
|
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived>
|
||||||
cwiseSqrt() const { return derived(); }
|
cwiseSqrt() const { return derived(); }
|
||||||
|
|
||||||
/** \returns an expression of the coefficient-wise inverse of *this.
|
/** \returns an expression of the coefficient-wise inverse of *this.
|
||||||
@ -62,7 +62,7 @@ cwiseSqrt() const { return derived(); }
|
|||||||
*
|
*
|
||||||
* \sa cwiseProduct()
|
* \sa cwiseProduct()
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>,Derived>
|
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived>
|
||||||
cwiseInverse() const { return derived(); }
|
cwiseInverse() const { return derived(); }
|
||||||
|
|
||||||
/** \returns an expression of the coefficient-wise == operator of \c *this and a scalar \a s
|
/** \returns an expression of the coefficient-wise == operator of \c *this and a scalar \a s
|
||||||
@ -74,7 +74,7 @@ cwiseInverse() const { return derived(); }
|
|||||||
*
|
*
|
||||||
* \sa cwiseEqual(const MatrixBase<OtherDerived> &) const
|
* \sa cwiseEqual(const MatrixBase<OtherDerived> &) const
|
||||||
*/
|
*/
|
||||||
inline const CwiseUnaryOp<std::binder1st<std::equal_to<Scalar> >,Derived>
|
inline const CwiseUnaryOp<std::binder1st<std::equal_to<Scalar> >, const Derived>
|
||||||
cwiseEqual(const Scalar& s) const
|
cwiseEqual(const Scalar& s) const
|
||||||
{
|
{
|
||||||
return CwiseUnaryOp<std::binder1st<std::equal_to<Scalar> >,Derived>
|
return CwiseUnaryOp<std::binder1st<std::equal_to<Scalar> >,Derived>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user