I have tried writing a function which takes a ColXpr value as input:
typedef Eigen::Array Signal2D;
vo
To complete previous answers, you're probably looking for the Ref<> class which will allow you to write a function that accept both columns of a matrix and vectors without templates nor copies:
void threshold(Ref params) {
params = (params >= 0 ).cast();
}
ArrayXf a;
ArrayXXf A;
/* ... */
threshold(a);
threshold(A.col(j));