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:
Gael Guennebaud
2008-09-03 17:16:28 +00:00
parent 622f2d5eae
commit 59dc1da5bf
5 changed files with 194 additions and 9 deletions

View File

@@ -25,6 +25,7 @@ namespace Eigen {
#include "src/Array/CwiseOperators.h"
#include "src/Array/Functors.h"
#include "src/Array/AllAndAny.h"
#include "src/Array/Select.h"
#include "src/Array/PartialRedux.h"
#include "src/Array/Random.h"