Classes | Typedefs | Functions
ArrayCwiseUnaryOps.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ShiftLeftXpr< N >
 
struct  ShiftRightXpr< N >
 

Typedefs

typedef CwiseUnaryOp< internal::scalar_abs2_op< Scalar >, const Derived > Abs2ReturnType
 
typedef CwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > AbsReturnType
 
typedef CwiseUnaryOp< internal::scalar_acos_op< Scalar >, const Derived > AcosReturnType
 
typedef CwiseUnaryOp< internal::scalar_arg_op< Scalar >, const Derived > ArgReturnType
 
typedef CwiseUnaryOp< internal::scalar_asin_op< Scalar >, const Derived > AsinReturnType
 
typedef CwiseUnaryOp< internal::scalar_atan_op< Scalar >, const Derived > AtanReturnType
 
typedef CwiseUnaryOp< internal::scalar_boolean_not_op< Scalar >, const Derived > BooleanNotReturnType
 
typedef CwiseUnaryOp< internal::scalar_ceil_op< Scalar >, const Derived > CeilReturnType
 
typedef CwiseUnaryOp< internal::scalar_cosh_op< Scalar >, const Derived > CoshReturnType
 
typedef CwiseUnaryOp< internal::scalar_cos_op< Scalar >, const Derived > CosReturnType
 
typedef CwiseUnaryOp< internal::scalar_cube_op< Scalar >, const Derived > CubeReturnType
 
typedef CwiseUnaryOp< internal::scalar_digamma_op< Scalar >, const Derived > DigammaReturnType
 
typedef CwiseUnaryOp< internal::scalar_erfc_op< Scalar >, const Derived > ErfcReturnType
 
typedef CwiseUnaryOp< internal::scalar_erf_op< Scalar >, const Derived > ErfReturnType
 
typedef CwiseUnaryOp< internal::scalar_expm1_op< Scalar >, const Derived > Expm1ReturnType
 
typedef CwiseUnaryOp< internal::scalar_exp_op< Scalar >, const Derived > ExpReturnType
 
typedef CwiseUnaryOp< internal::scalar_floor_op< Scalar >, const Derived > FloorReturnType
 
typedef CwiseUnaryOp< internal::scalar_inverse_op< Scalar >, const Derived > InverseReturnType
 
typedef CwiseUnaryOp< internal::scalar_isfinite_op< Scalar >, const Derived > IsFiniteReturnType
 
typedef CwiseUnaryOp< internal::scalar_isinf_op< Scalar >, const Derived > IsInfReturnType
 
typedef CwiseUnaryOp< internal::scalar_isnan_op< Scalar >, const Derived > IsNaNReturnType
 
typedef CwiseUnaryOp< internal::scalar_lgamma_op< Scalar >, const Derived > LgammaReturnType
 
typedef CwiseUnaryOp< internal::scalar_log10_op< Scalar >, const Derived > Log10ReturnType
 
typedef CwiseUnaryOp< internal::scalar_log1p_op< Scalar >, const Derived > Log1pReturnType
 
typedef CwiseUnaryOp< internal::scalar_log2_op< Scalar >, const Derived > Log2ReturnType
 
typedef CwiseUnaryOp< internal::scalar_logistic_op< Scalar >, const Derived > LogisticReturnType
 
typedef CwiseUnaryOp< internal::scalar_log_op< Scalar >, const Derived > LogReturnType
 
typedef CwiseUnaryOp< internal::scalar_ndtri_op< Scalar >, const Derived > NdtriReturnType
 
typedef CwiseUnaryOp< internal::scalar_rint_op< Scalar >, const Derived > RintReturnType
 
typedef CwiseUnaryOp< internal::scalar_round_op< Scalar >, const Derived > RoundReturnType
 
typedef CwiseUnaryOp< internal::scalar_rsqrt_op< Scalar >, const Derived > RsqrtReturnType
 
typedef CwiseUnaryOp< internal::scalar_sign_op< Scalar >, const Derived > SignReturnType
 
typedef CwiseUnaryOp< internal::scalar_sinh_op< Scalar >, const Derived > SinhReturnType
 
typedef CwiseUnaryOp< internal::scalar_sin_op< Scalar >, const Derived > SinReturnType
 
typedef CwiseUnaryOp< internal::scalar_sqrt_op< Scalar >, const Derived > SqrtReturnType
 
typedef CwiseUnaryOp< internal::scalar_square_op< Scalar >, const Derived > SquareReturnType
 
typedef CwiseUnaryOp< internal::scalar_tanh_op< Scalar >, const Derived > TanhReturnType
 
typedef CwiseUnaryOp< internal::scalar_tan_op< Scalar >, const Derived > TanReturnType
 

Functions

EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE AbsReturnType abs () const
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Abs2ReturnType abs2 () const
 
const EIGEN_DEVICE_FUNC AcosReturnType acos () const
 
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE ArgReturnType arg () const
 
const EIGEN_DEVICE_FUNC AsinReturnType asin () const
 
const EIGEN_DEVICE_FUNC AtanReturnType atan () const
 
const EIGEN_DEVICE_FUNC CeilReturnType ceil () const
 
const EIGEN_DEVICE_FUNC CosReturnType cos () const
 
const EIGEN_DEVICE_FUNC CoshReturnType cosh () const
 
const EIGEN_DEVICE_FUNC CubeReturnType cube () const
 
const EIGEN_DEVICE_FUNC DigammaReturnType digamma () const
 
const EIGEN_DEVICE_FUNC ErfReturnType erf () const
 
const EIGEN_DEVICE_FUNC ErfcReturnType erfc () const
 
const EIGEN_DEVICE_FUNC ExpReturnType exp () const
 
const EIGEN_DEVICE_FUNC Expm1ReturnType expm1 () const
 
const EIGEN_DEVICE_FUNC FloorReturnType floor () const
 
const EIGEN_DEVICE_FUNC InverseReturnType inverse () const
 
const EIGEN_DEVICE_FUNC IsFiniteReturnType isFinite () const
 
const EIGEN_DEVICE_FUNC IsInfReturnType isInf () const
 
const EIGEN_DEVICE_FUNC IsNaNReturnType isNaN () const
 
const EIGEN_DEVICE_FUNC LgammaReturnType lgamma () const
 
const EIGEN_DEVICE_FUNC LogReturnType log () const
 
const EIGEN_DEVICE_FUNC Log10ReturnType log10 () const
 
const EIGEN_DEVICE_FUNC Log1pReturnType log1p () const
 
const EIGEN_DEVICE_FUNC Log2ReturnType log2 () const
 
const EIGEN_DEVICE_FUNC LogisticReturnType logistic () const
 
const EIGEN_DEVICE_FUNC NdtriReturnType ndtri () const
 
const EIGEN_DEVICE_FUNC BooleanNotReturnType operator! () const
 
const EIGEN_DEVICE_FUNC RintReturnType rint () const
 
const EIGEN_DEVICE_FUNC RoundReturnType round () const
 
const EIGEN_DEVICE_FUNC RsqrtReturnType rsqrt () const
 
template<int N>
EIGEN_DEVICE_FUNC ShiftLeftXpr< N >::Type shiftLeft () const
 
template<int N>
EIGEN_DEVICE_FUNC ShiftRightXpr< N >::Type shiftRight () const
 
const EIGEN_DEVICE_FUNC SignReturnType sign () const
 
const EIGEN_DEVICE_FUNC SinReturnType sin () const
 
const EIGEN_DEVICE_FUNC SinhReturnType sinh () const
 
const EIGEN_DEVICE_FUNC SqrtReturnType sqrt () const
 
const EIGEN_DEVICE_FUNC SquareReturnType square () const
 
const EIGEN_DEVICE_FUNC TanReturnType tan () const
 
const EIGEN_DEVICE_FUNC TanhReturnType tanh () const
 

Typedef Documentation

◆ Abs2ReturnType

typedef CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived> Abs2ReturnType

Definition at line 5 of file ArrayCwiseUnaryOps.h.

◆ AbsReturnType

typedef CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived> AbsReturnType

Definition at line 3 of file ArrayCwiseUnaryOps.h.

◆ AcosReturnType

typedef CwiseUnaryOp<internal::scalar_acos_op<Scalar>, const Derived> AcosReturnType

Definition at line 21 of file ArrayCwiseUnaryOps.h.

◆ ArgReturnType

typedef CwiseUnaryOp<internal::scalar_arg_op<Scalar>, const Derived> ArgReturnType

Definition at line 4 of file ArrayCwiseUnaryOps.h.

◆ AsinReturnType

typedef CwiseUnaryOp<internal::scalar_asin_op<Scalar>, const Derived> AsinReturnType

Definition at line 22 of file ArrayCwiseUnaryOps.h.

◆ AtanReturnType

typedef CwiseUnaryOp<internal::scalar_atan_op<Scalar>, const Derived> AtanReturnType

Definition at line 23 of file ArrayCwiseUnaryOps.h.

◆ BooleanNotReturnType

typedef CwiseUnaryOp<internal::scalar_boolean_not_op<Scalar>, const Derived> BooleanNotReturnType

Definition at line 10 of file ArrayCwiseUnaryOps.h.

◆ CeilReturnType

typedef CwiseUnaryOp<internal::scalar_ceil_op<Scalar>, const Derived> CeilReturnType

Definition at line 38 of file ArrayCwiseUnaryOps.h.

◆ CoshReturnType

typedef CwiseUnaryOp<internal::scalar_cosh_op<Scalar>, const Derived> CoshReturnType

Definition at line 32 of file ArrayCwiseUnaryOps.h.

◆ CosReturnType

typedef CwiseUnaryOp<internal::scalar_cos_op<Scalar>, const Derived> CosReturnType

Definition at line 18 of file ArrayCwiseUnaryOps.h.

◆ CubeReturnType

typedef CwiseUnaryOp<internal::scalar_cube_op<Scalar>, const Derived> CubeReturnType

Definition at line 34 of file ArrayCwiseUnaryOps.h.

◆ DigammaReturnType

typedef CwiseUnaryOp<internal::scalar_digamma_op<Scalar>, const Derived> DigammaReturnType

Definition at line 603 of file ArrayCwiseUnaryOps.h.

◆ ErfcReturnType

typedef CwiseUnaryOp<internal::scalar_erfc_op<Scalar>, const Derived> ErfcReturnType

Definition at line 605 of file ArrayCwiseUnaryOps.h.

◆ ErfReturnType

typedef CwiseUnaryOp<internal::scalar_erf_op<Scalar>, const Derived> ErfReturnType

Definition at line 604 of file ArrayCwiseUnaryOps.h.

◆ Expm1ReturnType

typedef CwiseUnaryOp<internal::scalar_expm1_op<Scalar>, const Derived> Expm1ReturnType

Definition at line 13 of file ArrayCwiseUnaryOps.h.

◆ ExpReturnType

typedef CwiseUnaryOp<internal::scalar_exp_op<Scalar>, const Derived> ExpReturnType

Definition at line 12 of file ArrayCwiseUnaryOps.h.

◆ FloorReturnType

typedef CwiseUnaryOp<internal::scalar_floor_op<Scalar>, const Derived> FloorReturnType

Definition at line 37 of file ArrayCwiseUnaryOps.h.

◆ InverseReturnType

typedef CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived> InverseReturnType

Definition at line 9 of file ArrayCwiseUnaryOps.h.

◆ IsFiniteReturnType

typedef CwiseUnaryOp<internal::scalar_isfinite_op<Scalar>, const Derived> IsFiniteReturnType

Definition at line 41 of file ArrayCwiseUnaryOps.h.

◆ IsInfReturnType

typedef CwiseUnaryOp<internal::scalar_isinf_op<Scalar>, const Derived> IsInfReturnType

Definition at line 40 of file ArrayCwiseUnaryOps.h.

◆ IsNaNReturnType

typedef CwiseUnaryOp<internal::scalar_isnan_op<Scalar>, const Derived> IsNaNReturnType

Definition at line 39 of file ArrayCwiseUnaryOps.h.

◆ LgammaReturnType

typedef CwiseUnaryOp<internal::scalar_lgamma_op<Scalar>, const Derived> LgammaReturnType

Definition at line 602 of file ArrayCwiseUnaryOps.h.

◆ Log10ReturnType

typedef CwiseUnaryOp<internal::scalar_log10_op<Scalar>, const Derived> Log10ReturnType

Definition at line 16 of file ArrayCwiseUnaryOps.h.

◆ Log1pReturnType

typedef CwiseUnaryOp<internal::scalar_log1p_op<Scalar>, const Derived> Log1pReturnType

Definition at line 15 of file ArrayCwiseUnaryOps.h.

◆ Log2ReturnType

typedef CwiseUnaryOp<internal::scalar_log2_op<Scalar>, const Derived> Log2ReturnType

Definition at line 17 of file ArrayCwiseUnaryOps.h.

◆ LogisticReturnType

typedef CwiseUnaryOp<internal::scalar_logistic_op<Scalar>, const Derived> LogisticReturnType

Definition at line 25 of file ArrayCwiseUnaryOps.h.

◆ LogReturnType

typedef CwiseUnaryOp<internal::scalar_log_op<Scalar>, const Derived> LogReturnType

Definition at line 14 of file ArrayCwiseUnaryOps.h.

◆ NdtriReturnType

typedef CwiseUnaryOp<internal::scalar_ndtri_op<Scalar>, const Derived> NdtriReturnType

Definition at line 606 of file ArrayCwiseUnaryOps.h.

◆ RintReturnType

typedef CwiseUnaryOp<internal::scalar_rint_op<Scalar>, const Derived> RintReturnType

Definition at line 36 of file ArrayCwiseUnaryOps.h.

◆ RoundReturnType

typedef CwiseUnaryOp<internal::scalar_round_op<Scalar>, const Derived> RoundReturnType

Definition at line 35 of file ArrayCwiseUnaryOps.h.

◆ RsqrtReturnType

typedef CwiseUnaryOp<internal::scalar_rsqrt_op<Scalar>, const Derived> RsqrtReturnType

Definition at line 7 of file ArrayCwiseUnaryOps.h.

◆ SignReturnType

typedef CwiseUnaryOp<internal::scalar_sign_op<Scalar>, const Derived> SignReturnType

Definition at line 8 of file ArrayCwiseUnaryOps.h.

◆ SinhReturnType

typedef CwiseUnaryOp<internal::scalar_sinh_op<Scalar>, const Derived> SinhReturnType

Definition at line 26 of file ArrayCwiseUnaryOps.h.

◆ SinReturnType

typedef CwiseUnaryOp<internal::scalar_sin_op<Scalar>, const Derived> SinReturnType

Definition at line 19 of file ArrayCwiseUnaryOps.h.

◆ SqrtReturnType

typedef CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived> SqrtReturnType

Definition at line 6 of file ArrayCwiseUnaryOps.h.

◆ SquareReturnType

typedef CwiseUnaryOp<internal::scalar_square_op<Scalar>, const Derived> SquareReturnType

Definition at line 33 of file ArrayCwiseUnaryOps.h.

◆ TanhReturnType

typedef CwiseUnaryOp<internal::scalar_tanh_op<Scalar>, const Derived> TanhReturnType

Definition at line 24 of file ArrayCwiseUnaryOps.h.

◆ TanReturnType

typedef CwiseUnaryOp<internal::scalar_tan_op<Scalar>, const Derived> TanReturnType

Definition at line 20 of file ArrayCwiseUnaryOps.h.

Function Documentation

◆ abs()

Returns
an expression of the coefficient-wise absolute value of *this

Example:

Array3d v(1,-2,-3);
cout << v.abs() << endl;

Output:

See also
Math functions, abs2()

Definition at line 52 of file ArrayCwiseUnaryOps.h.

◆ abs2()

Returns
an expression of the coefficient-wise squared absolute value of *this

Example:

Array3d v(1,-2,-3);
cout << v.abs2() << endl;

Output:

See also
Math functions, abs(), square()

Definition at line 80 of file ArrayCwiseUnaryOps.h.

◆ acos()

const EIGEN_DEVICE_FUNC AcosReturnType acos ( ) const
inline
Returns
an expression of the coefficient-wise arc cosine of *this.

Example:

Array3d v(0, sqrt(2.)/2, 1);
cout << v.acos() << endl;

Output:

See also
Math functions, cos(), asin()

Definition at line 297 of file ArrayCwiseUnaryOps.h.

◆ arg()

Returns
an expression of the coefficient-wise phase angle of *this

Example:

ArrayXcf v = ArrayXcf::Random(3);
cout << v << endl << endl;
cout << arg(v) << endl;

Output:

See also
abs()

Definition at line 66 of file ArrayCwiseUnaryOps.h.

◆ asin()

const EIGEN_DEVICE_FUNC AsinReturnType asin ( ) const
inline
Returns
an expression of the coefficient-wise arc sine of *this.

Example:

Array3d v(0, sqrt(2.)/2, 1);
cout << v.asin() << endl;

Output:

See also
Math functions, sin(), acos()

Definition at line 311 of file ArrayCwiseUnaryOps.h.

◆ atan()

const EIGEN_DEVICE_FUNC AtanReturnType atan ( ) const
inline
Returns
an expression of the coefficient-wise arc tan of *this.

Example:

ArrayXd v = ArrayXd::LinSpaced(5,0,1);
cout << v.atan() << endl;

Output:

See also
Math functions, tan(), asin(), acos()

Definition at line 283 of file ArrayCwiseUnaryOps.h.

◆ ceil()

const EIGEN_DEVICE_FUNC CeilReturnType ceil ( ) const
inline
Returns
an expression of the coefficient-wise ceil of *this.

Example:

ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
cout << v << endl << endl;
cout << ceil(v) << endl;

Output:

See also
Math functions, floor(), round()

Definition at line 495 of file ArrayCwiseUnaryOps.h.

◆ cos()

const EIGEN_DEVICE_FUNC CosReturnType cos ( ) const
inline
Returns
an expression of the coefficient-wise cosine of *this.

This function computes the coefficient-wise cosine. The function MatrixBase::cos() in the unsupported module MatrixFunctions computes the matrix cosine.

Example:

Array3d v(M_PI, M_PI/2, M_PI/3);
cout << v.cos() << endl;

Output:

See also
Math functions, sin(), acos()

Definition at line 237 of file ArrayCwiseUnaryOps.h.

◆ cosh()

const EIGEN_DEVICE_FUNC CoshReturnType cosh ( ) const
inline
Returns
an expression of the coefficient-wise hyperbolic cos of *this.

Example:

ArrayXd v = ArrayXd::LinSpaced(5,0,1);
cout << cosh(v) << endl;

Output:

See also
Math functions, tanh(), sinh(), cosh()

Definition at line 353 of file ArrayCwiseUnaryOps.h.

◆ cube()

const EIGEN_DEVICE_FUNC CubeReturnType cube ( ) const
inline
Returns
an expression of the coefficient-wise cube of *this.

Example:

Array3d v(2,3,4);
cout << v.cube() << endl;

Output:

See also
Math functions, square(), pow()

Definition at line 439 of file ArrayCwiseUnaryOps.h.

◆ digamma()

const EIGEN_DEVICE_FUNC DigammaReturnType digamma ( ) const
inline
Returns
an expression of the coefficient-wise digamma (psi, derivative of lgamma).

\specialfunctions_module

Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of digamma(T) for any scalar type T to be supported.
See also
Math functions, Eigen::digamma(), Eigen::polygamma(), lgamma()

Definition at line 637 of file ArrayCwiseUnaryOps.h.

◆ erf()

const EIGEN_DEVICE_FUNC ErfReturnType erf ( ) const
inline

\cpp11

Returns
an expression of the coefficient-wise Gauss error function of *this.

\specialfunctions_module

Note
This function supports only float and double scalar types in c++11 mode. To support other scalar types, or float/double in non c++11 mode, the user has to provide implementations of erf(T) for any scalar type T to be supported.
See also
Math functions, erfc()

Definition at line 655 of file ArrayCwiseUnaryOps.h.

◆ erfc()

const EIGEN_DEVICE_FUNC ErfcReturnType erfc ( ) const
inline

\cpp11

Returns
an expression of the coefficient-wise Complementary error function of *this.

\specialfunctions_module

Note
This function supports only float and double scalar types in c++11 mode. To support other scalar types, or float/double in non c++11 mode, the user has to provide implementations of erfc(T) for any scalar type T to be supported.
See also
Math functions, erf()

Definition at line 673 of file ArrayCwiseUnaryOps.h.

◆ exp()

const EIGEN_DEVICE_FUNC ExpReturnType exp ( ) const
inline
Returns
an expression of the coefficient-wise exponential of *this.

This function computes the coefficient-wise exponential. The function MatrixBase::exp() in the unsupported module MatrixFunctions computes the matrix exponential.

Example:

Array3d v(1,2,3);
cout << v.exp() << endl;

Output:

See also
Math functions, pow(), log(), sin(), cos()

Definition at line 97 of file ArrayCwiseUnaryOps.h.

◆ expm1()

const EIGEN_DEVICE_FUNC Expm1ReturnType expm1 ( ) const
inline
Returns
an expression of the coefficient-wise exponential of *this minus 1.

In exact arithmetic, x.expm1() is equivalent to x.exp() - 1, however, with finite precision, this function is much more accurate when x is close to zero.

See also
Math functions, exp()

Definition at line 111 of file ArrayCwiseUnaryOps.h.

◆ floor()

const EIGEN_DEVICE_FUNC FloorReturnType floor ( ) const
inline
Returns
an expression of the coefficient-wise floor of *this.

Example:

ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
cout << v << endl << endl;
cout << floor(v) << endl;

Output:

See also
Math functions, ceil(), round()

Definition at line 481 of file ArrayCwiseUnaryOps.h.

◆ inverse()

const EIGEN_DEVICE_FUNC InverseReturnType inverse ( ) const
inline
Returns
an expression of the coefficient-wise inverse of *this.

Example:

Array3d v(2,3,4);
cout << v.inverse() << endl;

Output:

See also
operator/(), operator*()

Definition at line 411 of file ArrayCwiseUnaryOps.h.

◆ isFinite()

const EIGEN_DEVICE_FUNC IsFiniteReturnType isFinite ( ) const
inline
Returns
an expression of the coefficient-wise isfinite of *this.

Example:

Array3d v(1,2,3);
v(1) *= 0.0/0.0;
v(2) /= 0.0;
cout << v << endl << endl;
cout << isfinite(v) << endl;

Output:

See also
isnan(), isinf()

Definition at line 576 of file ArrayCwiseUnaryOps.h.

◆ isInf()

const EIGEN_DEVICE_FUNC IsInfReturnType isInf ( ) const
inline
Returns
an expression of the coefficient-wise isinf of *this.

Example:

Array3d v(1,2,3);
v(1) *= 0.0/0.0;
v(2) /= 0.0;
cout << v << endl << endl;
cout << isinf(v) << endl;

Output:

See also
isnan(), isfinite()

Definition at line 562 of file ArrayCwiseUnaryOps.h.

◆ isNaN()

const EIGEN_DEVICE_FUNC IsNaNReturnType isNaN ( ) const
inline
Returns
an expression of the coefficient-wise isnan of *this.

Example:

Array3d v(1,2,3);
v(1) *= 0.0/0.0;
v(2) /= 0.0;
cout << v << endl << endl;
cout << isnan(v) << endl;

Output:

See also
isfinite(), isinf()

Definition at line 548 of file ArrayCwiseUnaryOps.h.

◆ lgamma()

const EIGEN_DEVICE_FUNC LgammaReturnType lgamma ( ) const
inline

\cpp11

Returns
an expression of the coefficient-wise ln(|gamma(*this)|).

\specialfunctions_module

Note
This function supports only float and double scalar types in c++11 mode. To support other scalar types, or float/double in non c++11 mode, the user has to provide implementations of lgamma(T) for any scalar type T to be supported.
See also
Math functions, digamma()

Definition at line 620 of file ArrayCwiseUnaryOps.h.

◆ log()

const EIGEN_DEVICE_FUNC LogReturnType log ( ) const
inline
Returns
an expression of the coefficient-wise logarithm of *this.

This function computes the coefficient-wise logarithm. The function MatrixBase::log() in the unsupported module MatrixFunctions computes the matrix logarithm.

Example:

Array3d v(1,2,3);
cout << v.log() << endl;

Output:

See also
Math functions, log()

Definition at line 128 of file ArrayCwiseUnaryOps.h.

◆ log10()

const EIGEN_DEVICE_FUNC Log10ReturnType log10 ( ) const
inline
Returns
an expression of the coefficient-wise base-10 logarithm of *this.

This function computes the coefficient-wise base-10 logarithm.

Example:

Array4d v(-1,0,1,2);
cout << log10(v) << endl;

Output:

See also
Math functions, log()

Definition at line 158 of file ArrayCwiseUnaryOps.h.

◆ log1p()

const EIGEN_DEVICE_FUNC Log1pReturnType log1p ( ) const
inline
Returns
an expression of the coefficient-wise logarithm of 1 plus *this.

In exact arithmetic, x.log() is equivalent to (x+1).log(), however, with finite precision, this function is much more accurate when x is close to zero.

See also
Math functions, log()

Definition at line 142 of file ArrayCwiseUnaryOps.h.

◆ log2()

const EIGEN_DEVICE_FUNC Log2ReturnType log2 ( ) const
inline
Returns
an expression of the coefficient-wise base-2 logarithm of *this.

This function computes the coefficient-wise base-2 logarithm.

Definition at line 170 of file ArrayCwiseUnaryOps.h.

◆ logistic()

const EIGEN_DEVICE_FUNC LogisticReturnType logistic ( ) const
inline
Returns
an expression of the coefficient-wise logistic of *this.

Definition at line 397 of file ArrayCwiseUnaryOps.h.

◆ ndtri()

const EIGEN_DEVICE_FUNC NdtriReturnType ndtri ( ) const
inline
Returns
an expression of the coefficient-wise inverse of the CDF of the Normal distribution function function of *this.

\specialfunctions_module

In other words, considering x = ndtri(y), it returns the argument, x, for which the area under the Gaussian probability density function (integrated from minus infinity to x) is equal to y.

Note
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of ndtri(T) for any scalar type T to be supported.
See also
Math functions

Definition at line 693 of file ArrayCwiseUnaryOps.h.

◆ operator!()

const EIGEN_DEVICE_FUNC BooleanNotReturnType operator! ( ) const
inline
Returns
an expression of the coefficient-wise ! operator of *this
Warning
this operator is for expression of bool only.

Example:

Array3d v(1,2,3);
v(1) *= 0.0/0.0;
v(2) /= 0.0;
cout << v << endl << endl;
cout << !isfinite(v) << endl;

Output:

See also
operator!=()

Definition at line 592 of file ArrayCwiseUnaryOps.h.

◆ rint()

const EIGEN_DEVICE_FUNC RintReturnType rint ( ) const
inline
Returns
an expression of the coefficient-wise rint of *this.

Example:

ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
cout << v << endl << endl;
cout << rint(v) << endl;

Output:

See also
Math functions, ceil(), floor()

Definition at line 453 of file ArrayCwiseUnaryOps.h.

◆ round()

const EIGEN_DEVICE_FUNC RoundReturnType round ( ) const
inline
Returns
an expression of the coefficient-wise round of *this.

Example:

ArrayXd v = ArrayXd::LinSpaced(7,-2,2);
cout << v << endl << endl;
cout << round(v) << endl;

Output:

See also
Math functions, ceil(), floor()

Definition at line 467 of file ArrayCwiseUnaryOps.h.

◆ rsqrt()

const EIGEN_DEVICE_FUNC RsqrtReturnType rsqrt ( ) const
inline
Returns
an expression of the coefficient-wise inverse square root of *this.

This function computes the coefficient-wise inverse square root.

Example:

Array3d v(1,2,4);
cout << v.sqrt() << endl;

Output:

See also
pow(), square()

Definition at line 203 of file ArrayCwiseUnaryOps.h.

◆ shiftLeft()

template<int N>
EIGEN_DEVICE_FUNC ShiftLeftXpr<N>::Type shiftLeft ( ) const
Returns
an expression of *this with the Scalar type logically shifted left by N bit positions.

The template parameter N specifies the number of bit positions to shift.

See also
shiftRight()

Definition at line 534 of file ArrayCwiseUnaryOps.h.

◆ shiftRight()

template<int N>
EIGEN_DEVICE_FUNC ShiftRightXpr<N>::Type shiftRight ( ) const
Returns
an expression of *this with the Scalar type arithmetically shifted right by N bit positions.

The template parameter N specifies the number of bit positions to shift.

See also
shiftLeft()

Definition at line 514 of file ArrayCwiseUnaryOps.h.

◆ sign()

const EIGEN_DEVICE_FUNC SignReturnType sign ( ) const
inline
Returns
an expression of the coefficient-wise signum of *this.

This function computes the coefficient-wise signum.

Example:

Array3d v(-3,5,0);
cout << v.sign() << endl;

Output:

See also
pow(), square()

Definition at line 219 of file ArrayCwiseUnaryOps.h.

◆ sin()

const EIGEN_DEVICE_FUNC SinReturnType sin ( ) const
inline
Returns
an expression of the coefficient-wise sine of *this.

This function computes the coefficient-wise sine. The function MatrixBase::sin() in the unsupported module MatrixFunctions computes the matrix sine.

Example:

Array3d v(M_PI, M_PI/2, M_PI/3);
cout << v.sin() << endl;

Output:

See also
Math functions, cos(), asin()

Definition at line 255 of file ArrayCwiseUnaryOps.h.

◆ sinh()

const EIGEN_DEVICE_FUNC SinhReturnType sinh ( ) const
inline
Returns
an expression of the coefficient-wise hyperbolic sin of *this.

Example:

ArrayXd v = ArrayXd::LinSpaced(5,0,1);
cout << sinh(v) << endl;

Output:

See also
Math functions, sin(), tanh(), cosh()

Definition at line 339 of file ArrayCwiseUnaryOps.h.

◆ sqrt()

const EIGEN_DEVICE_FUNC SqrtReturnType sqrt ( ) const
inline
Returns
an expression of the coefficient-wise square root of *this.

This function computes the coefficient-wise square root. The function MatrixBase::sqrt() in the unsupported module MatrixFunctions computes the matrix square root.

Example:

Array3d v(1,2,4);
cout << v.sqrt() << endl;

Output:

See also
Math functions, pow(), square()

Definition at line 187 of file ArrayCwiseUnaryOps.h.

◆ square()

const EIGEN_DEVICE_FUNC SquareReturnType square ( ) const
inline
Returns
an expression of the coefficient-wise square of *this.

Example:

Array3d v(2,3,4);
cout << v.square() << endl;

Output:

See also
Math functions, abs2(), cube(), pow()

Definition at line 425 of file ArrayCwiseUnaryOps.h.

◆ tan()

const EIGEN_DEVICE_FUNC TanReturnType tan ( ) const
inline
Returns
an expression of the coefficient-wise tan of *this.

Example:

Array3d v(M_PI, M_PI/2, M_PI/3);
cout << v.tan() << endl;

Output:

See also
Math functions, cos(), sin()

Definition at line 269 of file ArrayCwiseUnaryOps.h.

◆ tanh()

const EIGEN_DEVICE_FUNC TanhReturnType tanh ( ) const
inline
Returns
an expression of the coefficient-wise hyperbolic tan of *this.

Example:

ArrayXd v = ArrayXd::LinSpaced(5,0,1);
cout << tanh(v) << endl;

Output:

See also
Math functions, tan(), sinh(), cosh()

Definition at line 325 of file ArrayCwiseUnaryOps.h.

isnan
#define isnan(X)
Definition: main.h:93
cosh
const EIGEN_DEVICE_FUNC CoshReturnType cosh() const
Definition: ArrayCwiseUnaryOps.h:353
rint
const EIGEN_DEVICE_FUNC RintReturnType rint() const
Definition: ArrayCwiseUnaryOps.h:453
round
double round(double x)
Definition: round.c:38
isfinite
#define isfinite(X)
Definition: main.h:95
arg
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE ArgReturnType arg() const
Definition: ArrayCwiseUnaryOps.h:66
tanh
const EIGEN_DEVICE_FUNC TanhReturnType tanh() const
Definition: ArrayCwiseUnaryOps.h:325
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
ceil
const EIGEN_DEVICE_FUNC CeilReturnType ceil() const
Definition: ArrayCwiseUnaryOps.h:495
M_PI
#define M_PI
Definition: mconf.h:117
sinh
const EIGEN_DEVICE_FUNC SinhReturnType sinh() const
Definition: ArrayCwiseUnaryOps.h:339
ceres::sqrt
Jet< T, N > sqrt(const Jet< T, N > &f)
Definition: jet.h:418
log10
const EIGEN_DEVICE_FUNC Log10ReturnType log10() const
Definition: ArrayCwiseUnaryOps.h:158
floor
const EIGEN_DEVICE_FUNC FloorReturnType floor() const
Definition: ArrayCwiseUnaryOps.h:481
isinf
#define isinf(X)
Definition: main.h:94


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:43:14