clarify intent
This commit is contained in:
@@ -316,18 +316,20 @@ BaseCube<elem_type,derived>::is_finite() const
|
||||
|
||||
return arrayops::is_finite( U.M.memptr(), U.M.n_elem );
|
||||
}
|
||||
|
||||
const ProxyCube<derived> 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<n_s; ++s)
|
||||
for(uword c=0; c<n_c; ++c)
|
||||
for(uword r=0; r<n_r; ++r)
|
||||
else
|
||||
{
|
||||
if( arma_isfinite(P.at(r,c,s)) == false ) { return false; }
|
||||
const ProxyCube<derived> 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<n_s; ++s)
|
||||
for(uword c=0; c<n_c; ++c)
|
||||
for(uword r=0; r<n_r; ++r)
|
||||
{
|
||||
if( arma_isfinite(P.at(r,c,s)) == false ) { return false; }
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -350,18 +352,20 @@ BaseCube<elem_type,derived>::has_inf() const
|
||||
|
||||
return arrayops::has_inf( U.M.memptr(), U.M.n_elem );
|
||||
}
|
||||
|
||||
const ProxyCube<derived> 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<n_s; ++s)
|
||||
for(uword c=0; c<n_c; ++c)
|
||||
for(uword r=0; r<n_r; ++r)
|
||||
else
|
||||
{
|
||||
if(arma_isinf(P.at(r,c,s))) { return true; }
|
||||
const ProxyCube<derived> 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<n_s; ++s)
|
||||
for(uword c=0; c<n_c; ++c)
|
||||
for(uword r=0; r<n_r; ++r)
|
||||
{
|
||||
if(arma_isinf(P.at(r,c,s))) { return true; }
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -384,18 +388,20 @@ BaseCube<elem_type,derived>::has_nan() const
|
||||
|
||||
return arrayops::has_nan( U.M.memptr(), U.M.n_elem );
|
||||
}
|
||||
|
||||
const ProxyCube<derived> 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<n_s; ++s)
|
||||
for(uword c=0; c<n_c; ++c)
|
||||
for(uword r=0; r<n_r; ++r)
|
||||
else
|
||||
{
|
||||
if(arma_isnan(P.at(r,c,s))) { return true; }
|
||||
const ProxyCube<derived> 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<n_s; ++s)
|
||||
for(uword c=0; c<n_c; ++c)
|
||||
for(uword r=0; r<n_r; ++r)
|
||||
{
|
||||
if(arma_isnan(P.at(r,c,s))) { return true; }
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -418,18 +424,20 @@ BaseCube<elem_type,derived>::has_nonfinite() const
|
||||
|
||||
return (arrayops::is_finite( U.M.memptr(), U.M.n_elem ) == false);
|
||||
}
|
||||
|
||||
const ProxyCube<derived> 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<n_s; ++s)
|
||||
for(uword c=0; c<n_c; ++c)
|
||||
for(uword r=0; r<n_r; ++r)
|
||||
else
|
||||
{
|
||||
if(arma_isfinite(P.at(r,c,s)) == false) { return true; }
|
||||
const ProxyCube<derived> 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<n_s; ++s)
|
||||
for(uword c=0; c<n_c; ++c)
|
||||
for(uword r=0; r<n_r; ++r)
|
||||
{
|
||||
if(arma_isfinite(P.at(r,c,s)) == false) { return true; }
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -673,29 +673,31 @@ Base<elem_type,derived>::is_finite() const
|
||||
|
||||
return arrayops::is_finite( U.M.memptr(), U.M.n_elem );
|
||||
}
|
||||
|
||||
const Proxy<derived> P( (*this).get_ref() );
|
||||
|
||||
if(Proxy<derived>::use_at == false)
|
||||
{
|
||||
const typename Proxy<derived>::ea_type Pea = P.get_ea();
|
||||
|
||||
const uword n_elem = P.get_n_elem();
|
||||
|
||||
for(uword i=0; i<n_elem; ++i)
|
||||
{
|
||||
if(arma_isfinite(Pea[i]) == false) { return false; }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const uword n_rows = P.get_n_rows();
|
||||
const uword n_cols = P.get_n_cols();
|
||||
const Proxy<derived> P( (*this).get_ref() );
|
||||
|
||||
for(uword col=0; col<n_cols; ++col)
|
||||
for(uword row=0; row<n_rows; ++row)
|
||||
if(Proxy<derived>::use_at == false)
|
||||
{
|
||||
if(arma_isfinite(P.at(row,col)) == false) { return false; }
|
||||
const typename Proxy<derived>::ea_type Pea = P.get_ea();
|
||||
|
||||
const uword n_elem = P.get_n_elem();
|
||||
|
||||
for(uword i=0; i<n_elem; ++i)
|
||||
{
|
||||
if(arma_isfinite(Pea[i]) == false) { return false; }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const uword n_rows = P.get_n_rows();
|
||||
const uword n_cols = P.get_n_cols();
|
||||
|
||||
for(uword col=0; col<n_cols; ++col)
|
||||
for(uword row=0; row<n_rows; ++row)
|
||||
{
|
||||
if(arma_isfinite(P.at(row,col)) == false) { return false; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -719,29 +721,31 @@ Base<elem_type,derived>::has_inf() const
|
||||
|
||||
return arrayops::has_inf( U.M.memptr(), U.M.n_elem );
|
||||
}
|
||||
|
||||
const Proxy<derived> P( (*this).get_ref() );
|
||||
|
||||
if(Proxy<derived>::use_at == false)
|
||||
{
|
||||
const typename Proxy<derived>::ea_type Pea = P.get_ea();
|
||||
|
||||
const uword n_elem = P.get_n_elem();
|
||||
|
||||
for(uword i=0; i<n_elem; ++i)
|
||||
{
|
||||
if(arma_isinf(Pea[i])) { return true; }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const uword n_rows = P.get_n_rows();
|
||||
const uword n_cols = P.get_n_cols();
|
||||
const Proxy<derived> P( (*this).get_ref() );
|
||||
|
||||
for(uword col=0; col<n_cols; ++col)
|
||||
for(uword row=0; row<n_rows; ++row)
|
||||
if(Proxy<derived>::use_at == false)
|
||||
{
|
||||
if(arma_isinf(P.at(row,col))) { return true; }
|
||||
const typename Proxy<derived>::ea_type Pea = P.get_ea();
|
||||
|
||||
const uword n_elem = P.get_n_elem();
|
||||
|
||||
for(uword i=0; i<n_elem; ++i)
|
||||
{
|
||||
if(arma_isinf(Pea[i])) { return true; }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const uword n_rows = P.get_n_rows();
|
||||
const uword n_cols = P.get_n_cols();
|
||||
|
||||
for(uword col=0; col<n_cols; ++col)
|
||||
for(uword row=0; row<n_rows; ++row)
|
||||
{
|
||||
if(arma_isinf(P.at(row,col))) { return true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,29 +769,31 @@ Base<elem_type,derived>::has_nan() const
|
||||
|
||||
return arrayops::has_nan( U.M.memptr(), U.M.n_elem );
|
||||
}
|
||||
|
||||
const Proxy<derived> P( (*this).get_ref() );
|
||||
|
||||
if(Proxy<derived>::use_at == false)
|
||||
{
|
||||
const typename Proxy<derived>::ea_type Pea = P.get_ea();
|
||||
|
||||
const uword n_elem = P.get_n_elem();
|
||||
|
||||
for(uword i=0; i<n_elem; ++i)
|
||||
{
|
||||
if(arma_isnan(Pea[i])) { return true; }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const uword n_rows = P.get_n_rows();
|
||||
const uword n_cols = P.get_n_cols();
|
||||
const Proxy<derived> P( (*this).get_ref() );
|
||||
|
||||
for(uword col=0; col<n_cols; ++col)
|
||||
for(uword row=0; row<n_rows; ++row)
|
||||
if(Proxy<derived>::use_at == false)
|
||||
{
|
||||
if(arma_isnan(P.at(row,col))) { return true; }
|
||||
const typename Proxy<derived>::ea_type Pea = P.get_ea();
|
||||
|
||||
const uword n_elem = P.get_n_elem();
|
||||
|
||||
for(uword i=0; i<n_elem; ++i)
|
||||
{
|
||||
if(arma_isnan(Pea[i])) { return true; }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const uword n_rows = P.get_n_rows();
|
||||
const uword n_cols = P.get_n_cols();
|
||||
|
||||
for(uword col=0; col<n_cols; ++col)
|
||||
for(uword row=0; row<n_rows; ++row)
|
||||
{
|
||||
if(arma_isnan(P.at(row,col))) { return true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -811,29 +817,31 @@ Base<elem_type,derived>::has_nonfinite() const
|
||||
|
||||
return (arrayops::is_finite( U.M.memptr(), U.M.n_elem ) == false);
|
||||
}
|
||||
|
||||
const Proxy<derived> P( (*this).get_ref() );
|
||||
|
||||
if(Proxy<derived>::use_at == false)
|
||||
{
|
||||
const typename Proxy<derived>::ea_type Pea = P.get_ea();
|
||||
|
||||
const uword n_elem = P.get_n_elem();
|
||||
|
||||
for(uword i=0; i<n_elem; ++i)
|
||||
{
|
||||
if(arma_isfinite(Pea[i]) == false) { return true; }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const uword n_rows = P.get_n_rows();
|
||||
const uword n_cols = P.get_n_cols();
|
||||
const Proxy<derived> P( (*this).get_ref() );
|
||||
|
||||
for(uword col=0; col<n_cols; ++col)
|
||||
for(uword row=0; row<n_rows; ++row)
|
||||
if(Proxy<derived>::use_at == false)
|
||||
{
|
||||
if(arma_isfinite(P.at(row,col)) == false) { return true; }
|
||||
const typename Proxy<derived>::ea_type Pea = P.get_ea();
|
||||
|
||||
const uword n_elem = P.get_n_elem();
|
||||
|
||||
for(uword i=0; i<n_elem; ++i)
|
||||
{
|
||||
if(arma_isfinite(Pea[i]) == false) { return true; }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const uword n_rows = P.get_n_rows();
|
||||
const uword n_cols = P.get_n_cols();
|
||||
|
||||
for(uword col=0; col<n_cols; ++col)
|
||||
for(uword row=0; row<n_rows; ++row)
|
||||
{
|
||||
if(arma_isfinite(P.at(row,col)) == false) { return true; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user