mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add a Select expression in the Array module which mimics a coeff-wise ?: operator.
Example: mat = (mat.cwise().abs().cwise() < Ones()).select(0,mat); replaces all small values by 0. (the scalar version is "s = abs(s)<1 ? 0 : s")
This commit is contained in:
@@ -50,8 +50,6 @@ template<typename MatrixType, int PacketAccess = AsRequested> class Map;
|
||||
template<typename MatrixType, unsigned int Mode> class Part;
|
||||
template<typename MatrixType, unsigned int Mode> class Extract;
|
||||
template<typename ExpressionType> class Cwise;
|
||||
template<typename ExpressionType, int Direction> class PartialRedux;
|
||||
template<typename MatrixType, typename BinaryOp, int Direction> class PartialReduxExpr;
|
||||
template<typename ExpressionType> class WithFormat;
|
||||
|
||||
template<typename Lhs, typename Rhs> struct ei_product_mode;
|
||||
@@ -94,6 +92,11 @@ void ei_cache_friendly_product(
|
||||
bool _rhsRowMajor, const Scalar* _rhs, int _rhsStride,
|
||||
bool resRowMajor, Scalar* res, int resStride);
|
||||
|
||||
// Array module
|
||||
template<typename ConditionMatrixType, typename ThenMatrixType, typename ElseMatrixType> class Select;
|
||||
template<typename MatrixType, typename BinaryOp, int Direction> class PartialReduxExpr;
|
||||
template<typename ExpressionType, int Direction> class PartialRedux;
|
||||
|
||||
template<typename MatrixType> class LU;
|
||||
template<typename MatrixType> class QR;
|
||||
template<typename MatrixType> class SVD;
|
||||
|
||||
Reference in New Issue
Block a user