mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +08:00
Complete the coeff-wise math function table.
This commit is contained in:
parent
9e8476ef22
commit
fd057f86b3
@ -36,7 +36,7 @@ typedef CwiseUnaryOp<internal::scalar_isfinite_op<Scalar>, const Derived> IsFini
|
||||
* Example: \include Cwise_abs.cpp
|
||||
* Output: \verbinclude Cwise_abs.out
|
||||
*
|
||||
* \sa abs2()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_abs">Math functions</a>, abs2()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE const AbsReturnType
|
||||
@ -64,7 +64,7 @@ arg() const
|
||||
* Example: \include Cwise_abs2.cpp
|
||||
* Output: \verbinclude Cwise_abs2.out
|
||||
*
|
||||
* \sa abs(), square()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_abs2">Math functions</a>, abs(), square()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE const Abs2ReturnType
|
||||
@ -81,7 +81,7 @@ abs2() const
|
||||
* Example: \include Cwise_exp.cpp
|
||||
* Output: \verbinclude Cwise_exp.out
|
||||
*
|
||||
* \sa pow(), log(), sin(), cos()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_exp">Math functions</a>, pow(), log(), sin(), cos()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const ExpReturnType
|
||||
@ -98,7 +98,7 @@ exp() const
|
||||
* Example: \include Cwise_log.cpp
|
||||
* Output: \verbinclude Cwise_log.out
|
||||
*
|
||||
* \sa exp()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_log">Math functions</a>, exp()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const LogReturnType
|
||||
@ -112,7 +112,7 @@ log() const
|
||||
* In exact arithmetic, \c x.log() is equivalent to \c (x+1).log(),
|
||||
* however, with finite precision, this function is much more accurate when \c x is close to zero.
|
||||
*
|
||||
* \sa log()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_log1p">Math functions</a>, log()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const Log1pReturnType
|
||||
@ -128,7 +128,7 @@ log1p() const
|
||||
* Example: \include Cwise_log10.cpp
|
||||
* Output: \verbinclude Cwise_log10.out
|
||||
*
|
||||
* \sa log()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_log10">Math functions</a>, log()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const Log10ReturnType
|
||||
@ -145,7 +145,7 @@ log10() const
|
||||
* Example: \include Cwise_sqrt.cpp
|
||||
* Output: \verbinclude Cwise_sqrt.out
|
||||
*
|
||||
* \sa pow(), square()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_sqrt">Math functions</a>, pow(), square()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const SqrtReturnType
|
||||
@ -195,7 +195,7 @@ sign() const
|
||||
* Example: \include Cwise_cos.cpp
|
||||
* Output: \verbinclude Cwise_cos.out
|
||||
*
|
||||
* \sa sin(), acos()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_cos">Math functions</a>, sin(), acos()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const CosReturnType
|
||||
@ -213,7 +213,7 @@ cos() const
|
||||
* Example: \include Cwise_sin.cpp
|
||||
* Output: \verbinclude Cwise_sin.out
|
||||
*
|
||||
* \sa cos(), asin()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_sin">Math functions</a>, cos(), asin()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const SinReturnType
|
||||
@ -227,7 +227,7 @@ sin() const
|
||||
* Example: \include Cwise_tan.cpp
|
||||
* Output: \verbinclude Cwise_tan.out
|
||||
*
|
||||
* \sa cos(), sin()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_tan">Math functions</a>, cos(), sin()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const TanReturnType
|
||||
@ -241,7 +241,7 @@ tan() const
|
||||
* Example: \include Cwise_atan.cpp
|
||||
* Output: \verbinclude Cwise_atan.out
|
||||
*
|
||||
* \sa tan(), asin(), acos()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_atan">Math functions</a>, tan(), asin(), acos()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const AtanReturnType
|
||||
@ -255,7 +255,7 @@ atan() const
|
||||
* Example: \include Cwise_acos.cpp
|
||||
* Output: \verbinclude Cwise_acos.out
|
||||
*
|
||||
* \sa cos(), asin()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_acos">Math functions</a>, cos(), asin()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const AcosReturnType
|
||||
@ -269,7 +269,7 @@ acos() const
|
||||
* Example: \include Cwise_asin.cpp
|
||||
* Output: \verbinclude Cwise_asin.out
|
||||
*
|
||||
* \sa sin(), acos()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_asin">Math functions</a>, sin(), acos()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const AsinReturnType
|
||||
@ -283,7 +283,7 @@ asin() const
|
||||
* Example: \include Cwise_tanh.cpp
|
||||
* Output: \verbinclude Cwise_tanh.out
|
||||
*
|
||||
* \sa tan(), sinh(), cosh()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_tanh">Math functions</a>, tan(), sinh(), cosh()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const TanhReturnType
|
||||
@ -297,7 +297,7 @@ tanh() const
|
||||
* Example: \include Cwise_sinh.cpp
|
||||
* Output: \verbinclude Cwise_sinh.out
|
||||
*
|
||||
* \sa sin(), tanh(), cosh()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_sinh">Math functions</a>, sin(), tanh(), cosh()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const SinhReturnType
|
||||
@ -311,7 +311,7 @@ sinh() const
|
||||
* Example: \include Cwise_cosh.cpp
|
||||
* Output: \verbinclude Cwise_cosh.out
|
||||
*
|
||||
* \sa tan(), sinh(), cosh()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_cosh">Math functions</a>, tan(), sinh(), cosh()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const CoshReturnType
|
||||
@ -339,7 +339,7 @@ inverse() const
|
||||
* Example: \include Cwise_square.cpp
|
||||
* Output: \verbinclude Cwise_square.out
|
||||
*
|
||||
* \sa operator/(), operator*(), abs2()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_squareE">Math functions</a>, abs2(), cube(), pow()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const SquareReturnType
|
||||
@ -353,7 +353,7 @@ square() const
|
||||
* Example: \include Cwise_cube.cpp
|
||||
* Output: \verbinclude Cwise_cube.out
|
||||
*
|
||||
* \sa square(), pow()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_cube">Math functions</a>, square(), pow()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const CubeReturnType
|
||||
@ -367,7 +367,7 @@ cube() const
|
||||
* Example: \include Cwise_round.cpp
|
||||
* Output: \verbinclude Cwise_round.out
|
||||
*
|
||||
* \sa ceil(), floor()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_round">Math functions</a>, ceil(), floor()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const RoundReturnType
|
||||
@ -381,7 +381,7 @@ round() const
|
||||
* Example: \include Cwise_floor.cpp
|
||||
* Output: \verbinclude Cwise_floor.out
|
||||
*
|
||||
* \sa ceil(), round()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_floor">Math functions</a>, ceil(), round()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const FloorReturnType
|
||||
@ -395,7 +395,7 @@ floor() const
|
||||
* Example: \include Cwise_ceil.cpp
|
||||
* Output: \verbinclude Cwise_ceil.out
|
||||
*
|
||||
* \sa floor(), round()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_ceil">Math functions</a>, floor(), round()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const CeilReturnType
|
||||
@ -483,7 +483,7 @@ typedef CwiseUnaryOp<internal::scalar_erfc_op<Scalar>, const Derived> ErfcReturn
|
||||
* 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.
|
||||
*
|
||||
* \sa digamma()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_lgamma">Math functions</a>, digamma()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const LgammaReturnType
|
||||
@ -500,7 +500,7 @@ lgamma() const
|
||||
* the user has to provide implementations of digamma(T) for any scalar
|
||||
* type T to be supported.
|
||||
*
|
||||
* \sa Eigen::digamma(), Eigen::polygamma(), lgamma()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_digamma">Math functions</a>, Eigen::digamma(), Eigen::polygamma(), lgamma()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const DigammaReturnType
|
||||
@ -521,7 +521,7 @@ digamma() const
|
||||
* 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.
|
||||
*
|
||||
* \sa erfc()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_erf">Math functions</a>, erfc()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const ErfReturnType
|
||||
@ -542,7 +542,7 @@ erf() const
|
||||
* 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.
|
||||
*
|
||||
* \sa erf()
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_erfc">Math functions</a>, erf()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const ErfcReturnType
|
||||
|
@ -62,7 +62,7 @@ cast() const
|
||||
|
||||
/** \returns an expression of the complex conjugate of \c *this.
|
||||
*
|
||||
* \sa adjoint() */
|
||||
* \sa <a href="group__CoeffwiseMathFunctions.html#cwisetable_conj">Math functions</a>, MatrixBase::adjoint() */
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline ConjugateReturnType
|
||||
conjugate() const
|
||||
|
@ -3,11 +3,11 @@ namespace Eigen {
|
||||
/** \eigenManualPage CoeffwiseMathFunctions Catalog of coefficient-wise math functions
|
||||
|
||||
|
||||
<span style="font-size:300%; color:red; font-weight: 900;">!WORK IN PROGRESS!</span>
|
||||
<!-- <span style="font-size:300%; color:red; font-weight: 900;">!WORK IN PROGRESS!</span> -->
|
||||
|
||||
This table presents a catalog of the coefficient-wise math functions supported by %Eigen.
|
||||
In this table, \c a, \c b, refer to Array objects or expressions, and \c m refers to a linear algebra Matrix/Vector object. Standard scalar types are abbreviated as follows:
|
||||
- \c int: \c ui32
|
||||
- \c int: \c i32
|
||||
- \c float: \c f
|
||||
- \c double: \c d
|
||||
- \c std::complex<float>: \c cf
|
||||
@ -43,7 +43,35 @@ This also means that, unless specified, if the function \c std::foo is available
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/fabs">std::abs</a>; \n
|
||||
abs(a[i]);
|
||||
</td>
|
||||
<td>SSE2, AVX (ui32,f,d)</td>
|
||||
<td>SSE2, AVX (i32,f,d)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_inverse
|
||||
a.\link ArrayBase::inverse inverse\endlink(); \n
|
||||
\link Eigen::inverse inverse\endlink(a); \n
|
||||
m.\link MatrixBase::cwiseInverse cwiseInverse\endlink();
|
||||
</td>
|
||||
<td>inverse value (\f$ 1/a_i \f$) </td>
|
||||
<td class="code">
|
||||
1/a[i];
|
||||
</td>
|
||||
<td>All engines (f,d,fc,fd)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_conj
|
||||
a.\link ArrayBase::conjugate conjugate\endlink(); \n
|
||||
\link Eigen::conj conj\endlink(a); \n
|
||||
m.\link MatrixBase::conjugate conjugate();
|
||||
</td>
|
||||
<td><a href="https://en.wikipedia.org/wiki/Complex_conjugate">complex conjugate</a> (\f$ \bar{a_i} \f$),\n
|
||||
no-op for real </td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/complex/conj">std::conj</a>; \n
|
||||
conj(a[i]);
|
||||
</td>
|
||||
<td>All engines (fc,fd)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Exponential functions</th>
|
||||
@ -67,12 +95,12 @@ This also means that, unless specified, if the function \c std::foo is available
|
||||
a.\link ArrayBase::log log\endlink(); \n
|
||||
\link Eigen::log log\endlink(a);
|
||||
</td>
|
||||
<td>natural (base \f$ e \f$) logarithm (\f$ ln({a_i}) \f$)</td>
|
||||
<td>natural (base \f$ e \f$) logarithm (\f$ \ln({a_i}) \f$)</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/log">std::log</a>; \n
|
||||
log(a[i]);
|
||||
</td>
|
||||
<td>SSE2, AVX (f,d)</td>
|
||||
<td>SSE2, AVX (f)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
@ -80,23 +108,298 @@ This also means that, unless specified, if the function \c std::foo is available
|
||||
a.\link ArrayBase::log1p log1p\endlink(); \n
|
||||
\link Eigen::log1p log1p\endlink(a);
|
||||
</td>
|
||||
<td>natural (base \f$ e \f$) logarithm of 1 plus \n the given number (\f$ ln({1+a_i}) \f$)</td>
|
||||
<td>natural (base \f$ e \f$) logarithm of 1 plus \n the given number (\f$ \ln({1+a_i}) \f$)</td>
|
||||
<td>built-in generic implementation based on \c log,\n
|
||||
plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/log1p">\c std::log1p </a>; \cpp11</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_log10
|
||||
a.\link ArrayBase::log10 log10\endlink(); \n
|
||||
\link Eigen::log10 log10\endlink(a);
|
||||
</td>
|
||||
<td>base 10 logarithm (\f$ \log_{10}({a_i}) \f$)</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/log10">std::log10</a>; \n
|
||||
log10(a[i]);
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Power functions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_pow
|
||||
a.\link ArrayBase::pow pow\endlink(b); \n
|
||||
\link Eigen::pow pow\endlink(a,b);
|
||||
</td>
|
||||
<td>raises a number to the given power (\f$ a_i ^ {b_i} \f$) \n \c a and \c b can be either an array or scalar.</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/pow">std::pow</a>; \n
|
||||
pow(a[i],b[i]);\n
|
||||
(plus builtin for integer types)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_sqrt
|
||||
a.\link ArrayBase::sqrt sqrt\endlink(); \n
|
||||
\link Eigen::sqrt sqrt\endlink(a);\n
|
||||
m.\link MatrixBase::cwiseSqrt cwiseSqrt\endlink();
|
||||
</td>
|
||||
<td>computes square root (\f$ \sqrt a_i \f$)</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/sqrt">std::sqrt</a>; \n
|
||||
sqrt(a[i]);</td>
|
||||
<td>SSE2, AVX (f,d)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_rsqrt
|
||||
a.\link ArrayBase::rsqrt rsqrt\endlink(); \n
|
||||
\link Eigen::rsqrt rsqrt\endlink(a);
|
||||
</td>
|
||||
<td><a href="https://en.wikipedia.org/wiki/Fast_inverse_square_root">reciprocal square root</a> (\f$ 1/{\sqrt a_i} \f$)</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/sqrt">std::sqrt</a>; \n
|
||||
1/sqrt(a[i]); \n
|
||||
</td>
|
||||
<td>SSE2, AVX, AltiVec, ZVector (f,d)\n
|
||||
(approx + 1 Newton iteration)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_square
|
||||
a.\link ArrayBase::square square\endlink(); \n
|
||||
\link Eigen::square square\endlink(a);
|
||||
</td>
|
||||
<td>computes square power (\f$ a_i^2 \f$)</td>
|
||||
<td class="code">
|
||||
a[i]*a[i]</td>
|
||||
<td>All (i32,f,d,cf,cd)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_cube
|
||||
a.\link ArrayBase::cube cube\endlink(); \n
|
||||
\link Eigen::cube cube\endlink(a);
|
||||
</td>
|
||||
<td>computes cubic power (\f$ a_i^3 \f$)</td>
|
||||
<td class="code">
|
||||
a[i]*a[i]*a[i]</td>
|
||||
<td>All (i32,f,d,cf,cd)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_abs2
|
||||
a.\link ArrayBase::abs2 abs2\endlink(); \n
|
||||
\link Eigen::abs2 abs2\endlink(a);\n
|
||||
m.\link MatrixBase::cwiseAbs2 cwiseAbs2\endlink();
|
||||
</td>
|
||||
<td>computes the squared absolute value (\f$ |a_i|^2 \f$)</td>
|
||||
<td class="code">
|
||||
real: a[i]*a[i] \n
|
||||
complex: real(a[i])*real(a[i]) \n
|
||||
+ imag(a[i])*imag(a[i])</td>
|
||||
<td>All (i32,f,d)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Trigonometric functions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_sin
|
||||
a.\link ArrayBase::sin sin\endlink(); \n
|
||||
\link Eigen::sin sin\endlink(a);
|
||||
</td>
|
||||
<td>computes sine</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/sin">std::sin</a>; \n
|
||||
sin(a[i]);</td>
|
||||
<td>SSE2, AVX (f)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_cos
|
||||
a.\link ArrayBase::cos cos\endlink(); \n
|
||||
\link Eigen::cos cos\endlink(a);
|
||||
</td>
|
||||
<td>computes cosine</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/cos">std::cos</a>; \n
|
||||
cos(a[i]);</td>
|
||||
<td>SSE2, AVX (f)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_tan
|
||||
a.\link ArrayBase::tan tan\endlink(); \n
|
||||
\link Eigen::tan tan\endlink(a);
|
||||
</td>
|
||||
<td>computes tangent</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/tan">std::tan</a>; \n
|
||||
tan(a[i]);</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_asin
|
||||
a.\link ArrayBase::asin asin\endlink(); \n
|
||||
\link Eigen::asin asin\endlink(a);
|
||||
</td>
|
||||
<td>computes arc sine (\f$ \sin^{-1} a_i \f$)</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/asin">std::asin</a>; \n
|
||||
asin(a[i]);</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_acos
|
||||
a.\link ArrayBase::acos acos\endlink(); \n
|
||||
\link Eigen::acos acos\endlink(a);
|
||||
</td>
|
||||
<td>computes arc cosine (\f$ \cos^{-1} a_i \f$)</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/acos">std::acos</a>; \n
|
||||
acos(a[i]);</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_atan
|
||||
a.\link ArrayBase::atan tan\endlink(); \n
|
||||
\link Eigen::atan atan\endlink(a);
|
||||
</td>
|
||||
<td>computes arc tangent (\f$ \tan^{-1} a_i \f$)</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/atan">std::atan</a>; \n
|
||||
atan(a[i]);</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Hyperbolic functions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_sinh
|
||||
a.\link ArrayBase::sinh sinh\endlink(); \n
|
||||
\link Eigen::sinh sinh\endlink(a);
|
||||
</td>
|
||||
<td>computes hyperbolic sine</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/sinh">std::sinh</a>; \n
|
||||
sinh(a[i]);</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_cosh
|
||||
a.\link ArrayBase::cosh cohs\endlink(); \n
|
||||
\link Eigen::cosh cosh\endlink(a);
|
||||
</td>
|
||||
<td>computes hyperbolic cosine</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/cosh">std::cosh</a>; \n
|
||||
cosh(a[i]);</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_tanh
|
||||
a.\link ArrayBase::tanh tanh\endlink(); \n
|
||||
\link Eigen::tanh tanh\endlink(a);
|
||||
</td>
|
||||
<td>computes hyperbolic tangent</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/tanh">std::tanh</a>; \n
|
||||
tanh(a[i]);</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Nearest integer floating point operations</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_ceil
|
||||
a.\link ArrayBase::ceil ceil\endlink(); \n
|
||||
\link Eigen::ceil ceil\endlink(a);
|
||||
</td>
|
||||
<td>nearest integer not less than the given value</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/ceil">std::ceil</a>; \n
|
||||
ceil(a[i]);</td>
|
||||
<td>SSE4,AVX,ZVector (f,d)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_floor
|
||||
a.\link ArrayBase::floor floor\endlink(); \n
|
||||
\link Eigen::floor floor\endlink(a);
|
||||
</td>
|
||||
<td>nearest integer not greater than the given value</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/floor">std::floor</a>; \n
|
||||
floor(a[i]);</td>
|
||||
<td>SSE4,AVX,ZVector (f,d)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_round
|
||||
a.\link ArrayBase::round round\endlink(); \n
|
||||
\link Eigen::round round\endlink(a);
|
||||
</td>
|
||||
<td>nearest integer, \n rounding away from zero in halfway cases</td>
|
||||
<td>built-in generic implementation \n based on \c floor and \c ceil,\n
|
||||
plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/round">\c std::round </a>; \cpp11</td>
|
||||
<td>SSE4,AVX,ZVector (f,d)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Floating point manipulation functions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Classification and comparison</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_isfinite
|
||||
a.\link ArrayBase::isfinite isfinite\endlink(); \n
|
||||
\link Eigen::isfinite isfinite\endlink(a);
|
||||
</td>
|
||||
<td>checks if the given number has finite value</td>
|
||||
<td>built-in generic implementation,\n
|
||||
plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/isfinite">\c std::isfinite </a>; \cpp11</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_isinf
|
||||
a.\link ArrayBase::isinf isinf\endlink(); \n
|
||||
\link Eigen::isinf isinf\endlink(a);
|
||||
</td>
|
||||
<td>checks if the given number is infinite</td>
|
||||
<td>built-in generic implementation,\n
|
||||
plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/isinf">\c std::isinf </a>; \cpp11</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_isnan
|
||||
a.\link ArrayBase::isnan isnan\endlink(); \n
|
||||
\link Eigen::isnan isnan\endlink(a);
|
||||
</td>
|
||||
<td>checks if the given number is not a number</td>
|
||||
<td>built-in generic implementation,\n
|
||||
plus \c using <a href="http://en.cppreference.com/w/cpp/numeric/math/isnan">\c std::isnan </a>; \cpp11</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Error and gamma functions</th>
|
||||
</tr>
|
||||
<tr> <td colspan="4"> Require \c #include \c <unsupported/Eigen/SpecialFunctions> </td></tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_erf
|
||||
@ -124,24 +427,89 @@ This also means that, unless specified, if the function \c std::foo is available
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Nearest integer floating point operations</th>
|
||||
<td class="code">
|
||||
\anchor cwisetable_lgamma
|
||||
a.\link ArrayBase::lgamma lgamma\endlink(); \n
|
||||
\link Eigen::lgamma lgamma\endlink(a);
|
||||
</td>
|
||||
<td>natural logarithm of the gamma function</td>
|
||||
<td class="code">
|
||||
using <a href="http://en.cppreference.com/w/cpp/numeric/math/lgamma">std::lgamma</a>; \cpp11 \n
|
||||
lgamma(a[i]);
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Floating point manipulation functions</th>
|
||||
<td class="code">
|
||||
\anchor cwisetable_digamma
|
||||
a.\link ArrayBase::digamma digamma\endlink(); \n
|
||||
\link Eigen::digamma digamma\endlink(a);
|
||||
</td>
|
||||
<td><a href="https://en.wikipedia.org/wiki/Digamma_function">logarithmic derivative of the gamma function</a></td>
|
||||
<td>
|
||||
built-in for float and double
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Classification and comparison</th>
|
||||
<td class="code">
|
||||
\anchor cwisetable_igamma
|
||||
\link Eigen::igamma igamma\endlink(a,x);
|
||||
</td>
|
||||
<td><a href="https://en.wikipedia.org/wiki/Incomplete_gamma_function">lower incomplete gamma integral</a>
|
||||
\n \f$ \gamma(a_i,x_i)= \frac{1}{|a_i|} \int_{0}^{x_i}e^{\text{-}t} t^{a_i-1} \mathrm{d} t \f$</td>
|
||||
<td>
|
||||
built-in for float and double,\n but requires \cpp11
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Miscellaneous</th>
|
||||
<td class="code">
|
||||
\anchor cwisetable_igammac
|
||||
\link Eigen::igammac igammac\endlink(a,x);
|
||||
</td>
|
||||
<td><a href="https://en.wikipedia.org/wiki/Incomplete_gamma_function">upper incomplete gamma integral</a>
|
||||
\n \f$ \Gamma(a_i,x_i) = \frac{1}{|a_i|} \int_{x_i}^{\infty}e^{\text{-}t} t^{a_i-1} \mathrm{d} t \f$</td>
|
||||
<td>
|
||||
built-in for float and double,\n but requires \cpp11
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">Special functions</th>
|
||||
</tr>
|
||||
<tr> <td colspan="4"> Require \c #include \c <unsupported/Eigen/SpecialFunctions> </td></tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_polygamma
|
||||
\link Eigen::polygamma polygamma\endlink(n,x);
|
||||
</td>
|
||||
<td><a href="https://en.wikipedia.org/wiki/Polygamma_function">n-th derivative of digamma at x</a></td>
|
||||
<td>
|
||||
built-in generic based on\n <a href="#cwisetable_lgamma">\c lgamma </a>,
|
||||
<a href="#cwisetable_digamma"> \c digamma </a>
|
||||
and <a href="#cwisetable_zeta">\c zeta </a>.
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_betainc
|
||||
\link Eigen::betainc betainc\endlink(a,b,x);
|
||||
</td>
|
||||
<td><a href="https://en.wikipedia.org/wiki/Beta_function#Incomplete_beta_function">Incomplete beta function</a></td>
|
||||
<td>
|
||||
built-in for float and double,\n but requires \cpp11
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="code">
|
||||
\anchor cwisetable_zeta
|
||||
a.\link ArrayBase::zeta zeta\endlink(b); \n
|
||||
\link Eigen::zeta zeta\endlink(a,b);
|
||||
</td>
|
||||
<td><a href="https://en.wikipedia.org/wiki/Hurwitz_zeta_function">Hurwitz zeta function</a> \n \f$ \zeta(a_i,b_i)=\sum_{k=0}^{\infty}(b_i+k)^{\text{-}a_i} \f$</td>
|
||||
<td><a href="https://en.wikipedia.org/wiki/Hurwitz_zeta_function">Hurwitz zeta function</a>
|
||||
\n \f$ \zeta(a_i,b_i)=\sum_{k=0}^{\infty}(b_i+k)^{\text{-}a_i} \f$</td>
|
||||
<td>
|
||||
built-in for float and double
|
||||
</td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user