It can be done with
bool Arma_test::Is_close(arma::cx_mat& X, arma::cx_mat& Y, double tol)
{
// abs returns a mat type then max checks columns and returns a row_vec
// max used again will return the biggest element in the row_vec
bool close(false);
if(arma::max(arma::max(arma::abs(X-Y))) < tol)
{
close = true;
}
return close;
}
See Armadillo Docs.