diff --git a/include/armadillo_bits/BaseCube_meat.hpp b/include/armadillo_bits/BaseCube_meat.hpp index 45dc07d0..d267d948 100644 --- a/include/armadillo_bits/BaseCube_meat.hpp +++ b/include/armadillo_bits/BaseCube_meat.hpp @@ -316,18 +316,20 @@ BaseCube::is_finite() const return arrayops::is_finite( U.M.memptr(), U.M.n_elem ); } - - const ProxyCube P( (*this).get_ref() ); - - const uword n_r = P.get_n_rows(); - const uword n_c = P.get_n_cols(); - const uword n_s = P.get_n_slices(); - - for(uword s=0; s P( (*this).get_ref() ); + + const uword n_r = P.get_n_rows(); + const uword n_c = P.get_n_cols(); + const uword n_s = P.get_n_slices(); + + for(uword s=0; s::has_inf() const return arrayops::has_inf( U.M.memptr(), U.M.n_elem ); } - - const ProxyCube P( (*this).get_ref() ); - - const uword n_r = P.get_n_rows(); - const uword n_c = P.get_n_cols(); - const uword n_s = P.get_n_slices(); - - for(uword s=0; s P( (*this).get_ref() ); + + const uword n_r = P.get_n_rows(); + const uword n_c = P.get_n_cols(); + const uword n_s = P.get_n_slices(); + + for(uword s=0; s::has_nan() const return arrayops::has_nan( U.M.memptr(), U.M.n_elem ); } - - const ProxyCube P( (*this).get_ref() ); - - const uword n_r = P.get_n_rows(); - const uword n_c = P.get_n_cols(); - const uword n_s = P.get_n_slices(); - - for(uword s=0; s P( (*this).get_ref() ); + + const uword n_r = P.get_n_rows(); + const uword n_c = P.get_n_cols(); + const uword n_s = P.get_n_slices(); + + for(uword s=0; s::has_nonfinite() const return (arrayops::is_finite( U.M.memptr(), U.M.n_elem ) == false); } - - const ProxyCube P( (*this).get_ref() ); - - const uword n_r = P.get_n_rows(); - const uword n_c = P.get_n_cols(); - const uword n_s = P.get_n_slices(); - - for(uword s=0; s P( (*this).get_ref() ); + + const uword n_r = P.get_n_rows(); + const uword n_c = P.get_n_cols(); + const uword n_s = P.get_n_slices(); + + for(uword s=0; s::is_finite() const return arrayops::is_finite( U.M.memptr(), U.M.n_elem ); } - - const Proxy P( (*this).get_ref() ); - - if(Proxy::use_at == false) - { - const typename Proxy::ea_type Pea = P.get_ea(); - - const uword n_elem = P.get_n_elem(); - - for(uword i=0; i P( (*this).get_ref() ); - for(uword col=0; col::use_at == false) { - if(arma_isfinite(P.at(row,col)) == false) { return false; } + const typename Proxy::ea_type Pea = P.get_ea(); + + const uword n_elem = P.get_n_elem(); + + for(uword i=0; i::has_inf() const return arrayops::has_inf( U.M.memptr(), U.M.n_elem ); } - - const Proxy P( (*this).get_ref() ); - - if(Proxy::use_at == false) - { - const typename Proxy::ea_type Pea = P.get_ea(); - - const uword n_elem = P.get_n_elem(); - - for(uword i=0; i P( (*this).get_ref() ); - for(uword col=0; col::use_at == false) { - if(arma_isinf(P.at(row,col))) { return true; } + const typename Proxy::ea_type Pea = P.get_ea(); + + const uword n_elem = P.get_n_elem(); + + for(uword i=0; i::has_nan() const return arrayops::has_nan( U.M.memptr(), U.M.n_elem ); } - - const Proxy P( (*this).get_ref() ); - - if(Proxy::use_at == false) - { - const typename Proxy::ea_type Pea = P.get_ea(); - - const uword n_elem = P.get_n_elem(); - - for(uword i=0; i P( (*this).get_ref() ); - for(uword col=0; col::use_at == false) { - if(arma_isnan(P.at(row,col))) { return true; } + const typename Proxy::ea_type Pea = P.get_ea(); + + const uword n_elem = P.get_n_elem(); + + for(uword i=0; i::has_nonfinite() const return (arrayops::is_finite( U.M.memptr(), U.M.n_elem ) == false); } - - const Proxy P( (*this).get_ref() ); - - if(Proxy::use_at == false) - { - const typename Proxy::ea_type Pea = P.get_ea(); - - const uword n_elem = P.get_n_elem(); - - for(uword i=0; i P( (*this).get_ref() ); - for(uword col=0; col::use_at == false) { - if(arma_isfinite(P.at(row,col)) == false) { return true; } + const typename Proxy::ea_type Pea = P.get_ea(); + + const uword n_elem = P.get_n_elem(); + + for(uword i=0; i