I am trying to obtain a logical vector from two other logical vectors connected through elementwise '&':
//[[Rcpp::export]]
arma::uvec test1(arma::vec t1, double R1, double R2){
arma::uvec t = (t1 >= R1) & (t1 < R2);
return t;
}
It returns the following error while I try to compile
error: no match for 'operator&' (operand types are 'arma::enable_if2<true, const arma::mtOp<unsigned int, arma::Col<double>, arma::op_rel_gteq_post> >::result {aka const arma::mtOp<unsigned int, arma::Col<double>, arma::op_rel_gteq_post>}' and 'arma::enable_if2<true, const arma::mtOp<unsigned int, arma::Col<double>, arma::op_rel_lt_post> >::result {aka const arma::mtOp<unsigned int, arma::Col<double>, arma::op_rel_lt_post>}')
arma::uvec t = (t1 >= R1) & (t1 < R2);
^
I have no idea what was going on. I am guessing that Armadillo does things differently. But I can't find any sources to help me clear things out. Any help would be appreciated! Thank you very much!