mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Move sigmoid functor to core.
This commit is contained in:
@@ -21,6 +21,7 @@ typedef CwiseUnaryOp<internal::scalar_acos_op<Scalar>, const Derived> AcosReturn
|
||||
typedef CwiseUnaryOp<internal::scalar_asin_op<Scalar>, const Derived> AsinReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_atan_op<Scalar>, const Derived> AtanReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_tanh_op<Scalar>, const Derived> TanhReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_sigmoid_op<Scalar>, const Derived> SigmoidReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_sinh_op<Scalar>, const Derived> SinhReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_cosh_op<Scalar>, const Derived> CoshReturnType;
|
||||
typedef CwiseUnaryOp<internal::scalar_square_op<Scalar>, const Derived> SquareReturnType;
|
||||
@@ -335,6 +336,15 @@ cosh() const
|
||||
return CoshReturnType(derived());
|
||||
}
|
||||
|
||||
/** \returns an expression of the coefficient-wise sigmoid of *this.
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline const SigmoidReturnType
|
||||
sigmoid() const
|
||||
{
|
||||
return SigmoidReturnType(derived());
|
||||
}
|
||||
|
||||
/** \returns an expression of the coefficient-wise inverse of *this.
|
||||
*
|
||||
* Example: \include Cwise_inverse.cpp
|
||||
|
||||
Reference in New Issue
Block a user