mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
const-qualify template parameters representing const arguments to expressions.
needed to fix docs compile issue.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
* \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
|
||||
{
|
||||
return derived();
|
||||
@@ -20,7 +20,7 @@ abs() const
|
||||
*
|
||||
* \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
|
||||
{
|
||||
return derived();
|
||||
@@ -33,7 +33,7 @@ abs2() const
|
||||
*
|
||||
* \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
|
||||
{
|
||||
return derived();
|
||||
@@ -46,7 +46,7 @@ exp() const
|
||||
*
|
||||
* \sa exp()
|
||||
*/
|
||||
inline const CwiseUnaryOp<internal::scalar_log_op<Scalar>, Derived>
|
||||
inline const CwiseUnaryOp<internal::scalar_log_op<Scalar>, const Derived>
|
||||
log() const
|
||||
{
|
||||
return derived();
|
||||
@@ -59,7 +59,7 @@ log() const
|
||||
*
|
||||
* \sa pow(), square()
|
||||
*/
|
||||
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, Derived>
|
||||
inline const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived>
|
||||
sqrt() const
|
||||
{
|
||||
return derived();
|
||||
@@ -72,7 +72,7 @@ sqrt() const
|
||||
*
|
||||
* \sa sin(), exp()
|
||||
*/
|
||||
inline const CwiseUnaryOp<internal::scalar_cos_op<Scalar>, Derived>
|
||||
inline const CwiseUnaryOp<internal::scalar_cos_op<Scalar>, const Derived>
|
||||
cos() const
|
||||
{
|
||||
return derived();
|
||||
@@ -86,7 +86,7 @@ cos() const
|
||||
*
|
||||
* \sa cos(), exp()
|
||||
*/
|
||||
inline const CwiseUnaryOp<internal::scalar_sin_op<Scalar>, Derived>
|
||||
inline const CwiseUnaryOp<internal::scalar_sin_op<Scalar>, const Derived>
|
||||
sin() const
|
||||
{
|
||||
return derived();
|
||||
@@ -100,10 +100,10 @@ sin() const
|
||||
*
|
||||
* \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
|
||||
{
|
||||
return CwiseUnaryOp<internal::scalar_pow_op<Scalar>,Derived>
|
||||
return CwiseUnaryOp<internal::scalar_pow_op<Scalar>, const Derived>
|
||||
(derived(), internal::scalar_pow_op<Scalar>(exponent));
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ pow(const Scalar& exponent) const
|
||||
*
|
||||
* \sa operator/(), operator*()
|
||||
*/
|
||||
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, Derived>
|
||||
inline const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived>
|
||||
inverse() const
|
||||
{
|
||||
return derived();
|
||||
@@ -128,7 +128,7 @@ inverse() const
|
||||
*
|
||||
* \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
|
||||
{
|
||||
return derived();
|
||||
@@ -141,16 +141,16 @@ square() const
|
||||
*
|
||||
* \sa square(), pow()
|
||||
*/
|
||||
inline const CwiseUnaryOp<internal::scalar_cube_op<Scalar>, Derived>
|
||||
inline const CwiseUnaryOp<internal::scalar_cube_op<Scalar>, const Derived>
|
||||
cube() const
|
||||
{
|
||||
return derived();
|
||||
}
|
||||
|
||||
#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 { \
|
||||
return CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >,Derived> \
|
||||
return CwiseUnaryOp<std::binder2nd<FUNCTOR<Scalar> >, const Derived> \
|
||||
(derived(), std::bind2nd(FUNCTOR<Scalar>(), s)); \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user