consistent layout for arma_debug_check()

This commit is contained in:
conrad
2021-01-28 12:26:13 +10:00
parent 6a312a98f6
commit 8fa243c3d0
21 changed files with 161 additions and 161 deletions
+20 -20
View File
@@ -560,7 +560,7 @@ Col<eT>::row(const uword in_row1)
{
arma_extra_debug_sigprint();
arma_debug_check( (in_row1 >= Mat<eT>::n_rows), "Col::row(): indices out of bounds or incorrectly used");
arma_debug_check( (in_row1 >= Mat<eT>::n_rows), "Col::row(): indices out of bounds or incorrectly used" );
return subview_col<eT>(*this, 0, in_row1, 1);
}
@@ -574,7 +574,7 @@ Col<eT>::row(const uword in_row1) const
{
arma_extra_debug_sigprint();
arma_debug_check( (in_row1 >= Mat<eT>::n_rows), "Col::row(): indices out of bounds or incorrectly used");
arma_debug_check( (in_row1 >= Mat<eT>::n_rows), "Col::row(): indices out of bounds or incorrectly used" );
return subview_col<eT>(*this, 0, in_row1, 1);
}
@@ -588,7 +588,7 @@ Col<eT>::rows(const uword in_row1, const uword in_row2)
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat<eT>::n_rows) ), "Col::rows(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat<eT>::n_rows) ), "Col::rows(): indices out of bounds or incorrectly used" );
const uword subview_n_rows = in_row2 - in_row1 + 1;
@@ -604,7 +604,7 @@ Col<eT>::rows(const uword in_row1, const uword in_row2) const
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat<eT>::n_rows) ), "Col::rows(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat<eT>::n_rows) ), "Col::rows(): indices out of bounds or incorrectly used" );
const uword subview_n_rows = in_row2 - in_row1 + 1;
@@ -620,7 +620,7 @@ Col<eT>::subvec(const uword in_row1, const uword in_row2)
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat<eT>::n_rows) ), "Col::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat<eT>::n_rows) ), "Col::subvec(): indices out of bounds or incorrectly used" );
const uword subview_n_rows = in_row2 - in_row1 + 1;
@@ -636,7 +636,7 @@ Col<eT>::subvec(const uword in_row1, const uword in_row2) const
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat<eT>::n_rows) ), "Col::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat<eT>::n_rows) ), "Col::subvec(): indices out of bounds or incorrectly used" );
const uword subview_n_rows = in_row2 - in_row1 + 1;
@@ -684,7 +684,7 @@ Col<eT>::subvec(const span& row_span)
const uword in_row2 = row_span.b;
const uword subvec_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1;
arma_debug_check( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ), "Col::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ), "Col::subvec(): indices out of bounds or incorrectly used" );
return subview_col<eT>(*this, 0, in_row1, subvec_n_rows);
}
@@ -706,7 +706,7 @@ Col<eT>::subvec(const span& row_span) const
const uword in_row2 = row_span.b;
const uword subvec_n_rows = row_all ? local_n_rows : in_row2 - in_row1 + 1;
arma_debug_check( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ), "Col::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( row_all ? false : ((in_row1 > in_row2) || (in_row2 >= local_n_rows)) ), "Col::subvec(): indices out of bounds or incorrectly used" );
return subview_col<eT>(*this, 0, in_row1, subvec_n_rows);
}
@@ -776,7 +776,7 @@ Col<eT>::head(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_rows), "Col::head(): size out of bounds");
arma_debug_check( (N > Mat<eT>::n_rows), "Col::head(): size out of bounds" );
return subview_col<eT>(*this, 0, 0, N);
}
@@ -790,7 +790,7 @@ Col<eT>::head(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_rows), "Col::head(): size out of bounds");
arma_debug_check( (N > Mat<eT>::n_rows), "Col::head(): size out of bounds" );
return subview_col<eT>(*this, 0, 0, N);
}
@@ -804,7 +804,7 @@ Col<eT>::tail(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_rows), "Col::tail(): size out of bounds");
arma_debug_check( (N > Mat<eT>::n_rows), "Col::tail(): size out of bounds" );
const uword start_row = Mat<eT>::n_rows - N;
@@ -820,7 +820,7 @@ Col<eT>::tail(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_rows), "Col::tail(): size out of bounds");
arma_debug_check( (N > Mat<eT>::n_rows), "Col::tail(): size out of bounds" );
const uword start_row = Mat<eT>::n_rows - N;
@@ -885,7 +885,7 @@ Col<eT>::shed_row(const uword row_num)
{
arma_extra_debug_sigprint();
arma_debug_check( row_num >= Mat<eT>::n_rows, "Col::shed_row(): index out of bounds");
arma_debug_check( row_num >= Mat<eT>::n_rows, "Col::shed_row(): index out of bounds" );
shed_rows(row_num, row_num);
}
@@ -958,7 +958,7 @@ Col<eT>::insert_rows(const uword row_num, const uword N, const bool set_to_zero)
const uword B_n_rows = t_n_rows - row_num;
// insertion at row_num == n_rows is in effect an append operation
arma_debug_check( (row_num > t_n_rows), "Col::insert_rows(): index out of bounds");
arma_debug_check( (row_num > t_n_rows), "Col::insert_rows(): index out of bounds" );
if(N > 0)
{
@@ -1054,7 +1054,7 @@ Col<eT>::begin_row(const uword row_num)
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::begin_row(): index out of bounds");
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::begin_row(): index out of bounds" );
return Mat<eT>::memptr() + row_num;
}
@@ -1068,7 +1068,7 @@ Col<eT>::begin_row(const uword row_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::begin_row(): index out of bounds");
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::begin_row(): index out of bounds" );
return Mat<eT>::memptr() + row_num;
}
@@ -1082,7 +1082,7 @@ Col<eT>::end_row(const uword row_num)
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::end_row(): index out of bounds");
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::end_row(): index out of bounds" );
return Mat<eT>::memptr() + row_num + 1;
}
@@ -1096,7 +1096,7 @@ Col<eT>::end_row(const uword row_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::end_row(): index out of bounds");
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::end_row(): index out of bounds" );
return Mat<eT>::memptr() + row_num + 1;
}
@@ -1544,7 +1544,7 @@ arma_warn_unused
eT&
Col<eT>::fixed<fixed_n_elem>::operator() (const uword ii)
{
arma_debug_check( (ii >= fixed_n_elem), "Col::operator(): index out of bounds");
arma_debug_check( (ii >= fixed_n_elem), "Col::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[ii] : Mat<eT>::mem_local[ii];
}
@@ -1558,7 +1558,7 @@ arma_warn_unused
const eT&
Col<eT>::fixed<fixed_n_elem>::operator() (const uword ii) const
{
arma_debug_check( (ii >= fixed_n_elem), "Col::operator(): index out of bounds");
arma_debug_check( (ii >= fixed_n_elem), "Col::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[ii] : Mat<eT>::mem_local[ii];
}
+17 -17
View File
@@ -1925,7 +1925,7 @@ Cube<eT>::shed_row(const uword row_num)
{
arma_extra_debug_sigprint();
arma_debug_check( row_num >= n_rows, "Cube::shed_row(): index out of bounds");
arma_debug_check( row_num >= n_rows, "Cube::shed_row(): index out of bounds" );
shed_rows(row_num, row_num);
}
@@ -1940,7 +1940,7 @@ Cube<eT>::shed_col(const uword col_num)
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= n_cols, "Cube::shed_col(): index out of bounds");
arma_debug_check( col_num >= n_cols, "Cube::shed_col(): index out of bounds" );
shed_cols(col_num, col_num);
}
@@ -1955,7 +1955,7 @@ Cube<eT>::shed_slice(const uword slice_num)
{
arma_extra_debug_sigprint();
arma_debug_check( slice_num >= n_slices, "Cube::shed_slice(): index out of bounds");
arma_debug_check( slice_num >= n_slices, "Cube::shed_slice(): index out of bounds" );
shed_slices(slice_num, slice_num);
}
@@ -2147,7 +2147,7 @@ Cube<eT>::insert_rows(const uword row_num, const uword N, const bool set_to_zero
const uword B_n_rows = t_n_rows - row_num;
// insertion at row_num == n_rows is in effect an append operation
arma_debug_check( (row_num > t_n_rows), "Cube::insert_rows(): index out of bounds");
arma_debug_check( (row_num > t_n_rows), "Cube::insert_rows(): index out of bounds" );
if(N > 0)
{
@@ -2187,7 +2187,7 @@ Cube<eT>::insert_cols(const uword col_num, const uword N, const bool set_to_zero
const uword B_n_cols = t_n_cols - col_num;
// insertion at col_num == n_cols is in effect an append operation
arma_debug_check( (col_num > t_n_cols), "Cube::insert_cols(): index out of bounds");
arma_debug_check( (col_num > t_n_cols), "Cube::insert_cols(): index out of bounds" );
if(N > 0)
{
@@ -2229,7 +2229,7 @@ Cube<eT>::insert_slices(const uword slice_num, const uword N, const bool set_to_
const uword B_n_slices = t_n_slices - slice_num;
// insertion at slice_num == n_slices is in effect an append operation
arma_debug_check( (slice_num > t_n_slices), "Cube::insert_slices(): index out of bounds");
arma_debug_check( (slice_num > t_n_slices), "Cube::insert_slices(): index out of bounds" );
if(N > 0)
{
@@ -2280,7 +2280,7 @@ Cube<eT>::insert_rows(const uword row_num, const BaseCube<eT,T1>& X)
const uword B_n_rows = t_n_rows - row_num;
// insertion at row_num == n_rows is in effect an append operation
arma_debug_check( (row_num > t_n_rows), "Cube::insert_rows(): index out of bounds");
arma_debug_check( (row_num > t_n_rows), "Cube::insert_rows(): index out of bounds" );
arma_debug_check
(
@@ -2329,7 +2329,7 @@ Cube<eT>::insert_cols(const uword col_num, const BaseCube<eT,T1>& X)
const uword B_n_cols = t_n_cols - col_num;
// insertion at col_num == n_cols is in effect an append operation
arma_debug_check( (col_num > t_n_cols), "Cube::insert_cols(): index out of bounds");
arma_debug_check( (col_num > t_n_cols), "Cube::insert_cols(): index out of bounds" );
arma_debug_check
(
@@ -2380,7 +2380,7 @@ Cube<eT>::insert_slices(const uword slice_num, const BaseCube<eT,T1>& X)
const uword B_n_slices = t_n_slices - slice_num;
// insertion at slice_num == n_slices is in effect an append operation
arma_debug_check( (slice_num > t_n_slices), "Cube::insert_slices(): index out of bounds");
arma_debug_check( (slice_num > t_n_slices), "Cube::insert_slices(): index out of bounds" );
arma_debug_check
(
@@ -3220,7 +3220,7 @@ arma_warn_unused
eT&
Cube<eT>::operator() (const uword i)
{
arma_debug_check( (i >= n_elem), "Cube::operator(): index out of bounds");
arma_debug_check( (i >= n_elem), "Cube::operator(): index out of bounds" );
return access::rw(mem[i]);
}
@@ -3234,7 +3234,7 @@ arma_warn_unused
const eT&
Cube<eT>::operator() (const uword i) const
{
arma_debug_check( (i >= n_elem), "Cube::operator(): index out of bounds");
arma_debug_check( (i >= n_elem), "Cube::operator(): index out of bounds" );
return mem[i];
}
@@ -4761,7 +4761,7 @@ Cube<eT>::begin_slice(const uword slice_num)
{
arma_extra_debug_sigprint();
arma_debug_check( (slice_num >= n_slices), "begin_slice(): index out of bounds");
arma_debug_check( (slice_num >= n_slices), "begin_slice(): index out of bounds" );
return slice_memptr(slice_num);
}
@@ -4775,7 +4775,7 @@ Cube<eT>::begin_slice(const uword slice_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( (slice_num >= n_slices), "begin_slice(): index out of bounds");
arma_debug_check( (slice_num >= n_slices), "begin_slice(): index out of bounds" );
return slice_memptr(slice_num);
}
@@ -4789,7 +4789,7 @@ Cube<eT>::end_slice(const uword slice_num)
{
arma_extra_debug_sigprint();
arma_debug_check( (slice_num >= n_slices), "end_slice(): index out of bounds");
arma_debug_check( (slice_num >= n_slices), "end_slice(): index out of bounds" );
return slice_memptr(slice_num) + n_elem_slice;
}
@@ -4803,7 +4803,7 @@ Cube<eT>::end_slice(const uword slice_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( (slice_num >= n_slices), "end_slice(): index out of bounds");
arma_debug_check( (slice_num >= n_slices), "end_slice(): index out of bounds" );
return slice_memptr(slice_num) + n_elem_slice;
}
@@ -5215,7 +5215,7 @@ arma_warn_unused
eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::operator() (const uword i)
{
arma_debug_check( (i >= fixed_n_elem), "Cube::operator(): index out of bounds");
arma_debug_check( (i >= fixed_n_elem), "Cube::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[i] : mem_local[i];
}
@@ -5229,7 +5229,7 @@ arma_warn_unused
const eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::operator() (const uword i) const
{
arma_debug_check( (i >= fixed_n_elem), "Cube::operator(): index out of bounds");
arma_debug_check( (i >= fixed_n_elem), "Cube::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[i] : mem_local[i];
}
+29 -29
View File
@@ -26,7 +26,7 @@ Mat<eT>::~Mat()
if(n_alloc > arma_config::mat_prealloc)
{
arma_extra_debug_print("Mat::destructor: releasing memory");
arma_extra_debug_print("Mat::destructor: releasing memory" );
memory::release( access::rw(mem) );
}
@@ -2974,7 +2974,7 @@ Mat<eT>::col(const uword col_num)
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= n_cols, "Mat::col(): index out of bounds");
arma_debug_check( col_num >= n_cols, "Mat::col(): index out of bounds" );
return subview_col<eT>(*this, col_num);
}
@@ -2989,7 +2989,7 @@ Mat<eT>::col(const uword col_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= n_cols, "Mat::col(): index out of bounds");
arma_debug_check( col_num >= n_cols, "Mat::col(): index out of bounds" );
return subview_col<eT>(*this, col_num);
}
@@ -3066,7 +3066,7 @@ Mat<eT>::unsafe_col(const uword col_num)
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= n_cols, "Mat::unsafe_col(): index out of bounds");
arma_debug_check( col_num >= n_cols, "Mat::unsafe_col(): index out of bounds" );
return Col<eT>(colptr(col_num), n_rows, false, true);
}
@@ -3085,7 +3085,7 @@ Mat<eT>::unsafe_col(const uword col_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= n_cols, "Mat::unsafe_col(): index out of bounds");
arma_debug_check( col_num >= n_cols, "Mat::unsafe_col(): index out of bounds" );
typedef const Col<eT> out_type;
@@ -3511,7 +3511,7 @@ Mat<eT>::head_rows(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_rows), "Mat::head_rows(): size out of bounds");
arma_debug_check( (N > n_rows), "Mat::head_rows(): size out of bounds" );
return subview<eT>(*this, 0, 0, N, n_cols);
}
@@ -3525,7 +3525,7 @@ Mat<eT>::head_rows(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_rows), "Mat::head_rows(): size out of bounds");
arma_debug_check( (N > n_rows), "Mat::head_rows(): size out of bounds" );
return subview<eT>(*this, 0, 0, N, n_cols);
}
@@ -3539,7 +3539,7 @@ Mat<eT>::tail_rows(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_rows), "Mat::tail_rows(): size out of bounds");
arma_debug_check( (N > n_rows), "Mat::tail_rows(): size out of bounds" );
const uword start_row = n_rows - N;
@@ -3555,7 +3555,7 @@ Mat<eT>::tail_rows(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_rows), "Mat::tail_rows(): size out of bounds");
arma_debug_check( (N > n_rows), "Mat::tail_rows(): size out of bounds" );
const uword start_row = n_rows - N;
@@ -3571,7 +3571,7 @@ Mat<eT>::head_cols(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_cols), "Mat::head_cols(): size out of bounds");
arma_debug_check( (N > n_cols), "Mat::head_cols(): size out of bounds" );
return subview<eT>(*this, 0, 0, n_rows, N);
}
@@ -3585,7 +3585,7 @@ Mat<eT>::head_cols(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_cols), "Mat::head_cols(): size out of bounds");
arma_debug_check( (N > n_cols), "Mat::head_cols(): size out of bounds" );
return subview<eT>(*this, 0, 0, n_rows, N);
}
@@ -3599,7 +3599,7 @@ Mat<eT>::tail_cols(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_cols), "Mat::tail_cols(): size out of bounds");
arma_debug_check( (N > n_cols), "Mat::tail_cols(): size out of bounds" );
const uword start_col = n_cols - N;
@@ -3615,7 +3615,7 @@ Mat<eT>::tail_cols(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_cols), "Mat::tail_cols(): size out of bounds");
arma_debug_check( (N > n_cols), "Mat::tail_cols(): size out of bounds" );
const uword start_col = n_cols - N;
@@ -4175,7 +4175,7 @@ Mat<eT>::shed_row(const uword row_num)
{
arma_extra_debug_sigprint();
arma_debug_check( row_num >= n_rows, "Mat::shed_row(): index out of bounds");
arma_debug_check( row_num >= n_rows, "Mat::shed_row(): index out of bounds" );
shed_rows(row_num, row_num);
}
@@ -4190,7 +4190,7 @@ Mat<eT>::shed_col(const uword col_num)
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= n_cols, "Mat::shed_col(): index out of bounds");
arma_debug_check( col_num >= n_cols, "Mat::shed_col(): index out of bounds" );
shed_cols(col_num, col_num);
}
@@ -4421,7 +4421,7 @@ Mat<eT>::insert_rows(const uword row_num, const uword N, const bool set_to_zero)
const uword B_n_rows = t_n_rows - row_num;
// insertion at row_num == n_rows is in effect an append operation
arma_debug_check( (row_num > t_n_rows), "Mat::insert_rows(): index out of bounds");
arma_debug_check( (row_num > t_n_rows), "Mat::insert_rows(): index out of bounds" );
if(N > 0)
{
@@ -4464,7 +4464,7 @@ Mat<eT>::insert_cols(const uword col_num, const uword N, const bool set_to_zero)
const uword B_n_cols = t_n_cols - col_num;
// insertion at col_num == n_cols is in effect an append operation
arma_debug_check( (col_num > t_n_cols), "Mat::insert_cols(): index out of bounds");
arma_debug_check( (col_num > t_n_cols), "Mat::insert_cols(): index out of bounds" );
if(N > 0)
{
@@ -5854,7 +5854,7 @@ arma_warn_unused
eT&
Mat<eT>::operator() (const uword ii)
{
arma_debug_check( (ii >= n_elem), "Mat::operator(): index out of bounds");
arma_debug_check( (ii >= n_elem), "Mat::operator(): index out of bounds" );
return access::rw(mem[ii]);
}
@@ -5868,7 +5868,7 @@ arma_warn_unused
const eT&
Mat<eT>::operator() (const uword ii) const
{
arma_debug_check( (ii >= n_elem), "Mat::operator(): index out of bounds");
arma_debug_check( (ii >= n_elem), "Mat::operator(): index out of bounds" );
return mem[ii];
}
@@ -5929,7 +5929,7 @@ arma_warn_unused
eT&
Mat<eT>::operator() (const uword in_row, const uword in_col)
{
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "Mat::operator(): index out of bounds");
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "Mat::operator(): index out of bounds" );
return access::rw(mem[in_row + in_col*n_rows]);
}
@@ -5943,7 +5943,7 @@ arma_warn_unused
const eT&
Mat<eT>::operator() (const uword in_row, const uword in_col) const
{
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "Mat::operator(): index out of bounds");
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "Mat::operator(): index out of bounds" );
return mem[in_row + in_col*n_rows];
}
@@ -8742,7 +8742,7 @@ Mat<eT>::begin_col(const uword col_num)
{
arma_extra_debug_sigprint();
arma_debug_check( (col_num >= n_cols), "Mat::begin_col(): index out of bounds");
arma_debug_check( (col_num >= n_cols), "Mat::begin_col(): index out of bounds" );
return colptr(col_num);
}
@@ -8756,7 +8756,7 @@ Mat<eT>::begin_col(const uword col_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( (col_num >= n_cols), "Mat::begin_col(): index out of bounds");
arma_debug_check( (col_num >= n_cols), "Mat::begin_col(): index out of bounds" );
return colptr(col_num);
}
@@ -8770,7 +8770,7 @@ Mat<eT>::end_col(const uword col_num)
{
arma_extra_debug_sigprint();
arma_debug_check( (col_num >= n_cols), "Mat::end_col(): index out of bounds");
arma_debug_check( (col_num >= n_cols), "Mat::end_col(): index out of bounds" );
return colptr(col_num) + n_rows;
}
@@ -8784,7 +8784,7 @@ Mat<eT>::end_col(const uword col_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( (col_num >= n_cols), "Mat::end_col(): index out of bounds");
arma_debug_check( (col_num >= n_cols), "Mat::end_col(): index out of bounds" );
return colptr(col_num) + n_rows;
}
@@ -9351,7 +9351,7 @@ arma_warn_unused
eT&
Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::operator() (const uword ii)
{
arma_debug_check( (ii >= fixed_n_elem), "Mat::operator(): index out of bounds");
arma_debug_check( (ii >= fixed_n_elem), "Mat::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[ii] : mem_local[ii];
}
@@ -9365,7 +9365,7 @@ arma_warn_unused
const eT&
Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::operator() (const uword ii) const
{
arma_debug_check( (ii >= fixed_n_elem), "Mat::operator(): index out of bounds");
arma_debug_check( (ii >= fixed_n_elem), "Mat::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[ii] : mem_local[ii];
}
@@ -9407,7 +9407,7 @@ arma_warn_unused
eT&
Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::operator() (const uword in_row, const uword in_col)
{
arma_debug_check( ((in_row >= fixed_n_rows) || (in_col >= fixed_n_cols)), "Mat::operator(): index out of bounds");
arma_debug_check( ((in_row >= fixed_n_rows) || (in_col >= fixed_n_cols)), "Mat::operator(): index out of bounds" );
const uword iq = in_row + in_col*fixed_n_rows;
@@ -9423,7 +9423,7 @@ arma_warn_unused
const eT&
Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::operator() (const uword in_row, const uword in_col) const
{
arma_debug_check( ((in_row >= fixed_n_rows) || (in_col >= fixed_n_cols)), "Mat::operator(): index out of bounds");
arma_debug_check( ((in_row >= fixed_n_rows) || (in_col >= fixed_n_cols)), "Mat::operator(): index out of bounds" );
const uword iq = in_row + in_col*fixed_n_rows;
+20 -20
View File
@@ -560,7 +560,7 @@ Row<eT>::col(const uword in_col1)
{
arma_extra_debug_sigprint();
arma_debug_check( (in_col1 >= Mat<eT>::n_cols), "Row::col(): indices out of bounds or incorrectly used");
arma_debug_check( (in_col1 >= Mat<eT>::n_cols), "Row::col(): indices out of bounds or incorrectly used" );
return subview_row<eT>(*this, 0, in_col1, 1);
}
@@ -574,7 +574,7 @@ Row<eT>::col(const uword in_col1) const
{
arma_extra_debug_sigprint();
arma_debug_check( (in_col1 >= Mat<eT>::n_cols), "Row::col(): indices out of bounds or incorrectly used");
arma_debug_check( (in_col1 >= Mat<eT>::n_cols), "Row::col(): indices out of bounds or incorrectly used" );
return subview_row<eT>(*this, 0, in_col1, 1);
}
@@ -588,7 +588,7 @@ Row<eT>::cols(const uword in_col1, const uword in_col2)
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::cols(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::cols(): indices out of bounds or incorrectly used" );
const uword subview_n_cols = in_col2 - in_col1 + 1;
@@ -604,7 +604,7 @@ Row<eT>::cols(const uword in_col1, const uword in_col2) const
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::cols(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::cols(): indices out of bounds or incorrectly used" );
const uword subview_n_cols = in_col2 - in_col1 + 1;
@@ -620,7 +620,7 @@ Row<eT>::subvec(const uword in_col1, const uword in_col2)
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::subvec(): indices out of bounds or incorrectly used" );
const uword subview_n_cols = in_col2 - in_col1 + 1;
@@ -636,7 +636,7 @@ Row<eT>::subvec(const uword in_col1, const uword in_col2) const
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat<eT>::n_cols) ), "Row::subvec(): indices out of bounds or incorrectly used" );
const uword subview_n_cols = in_col2 - in_col1 + 1;
@@ -684,7 +684,7 @@ Row<eT>::subvec(const span& col_span)
const uword in_col2 = col_span.b;
const uword subvec_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1;
arma_debug_check( ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ), "Row::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ), "Row::subvec(): indices out of bounds or incorrectly used" );
return subview_row<eT>(*this, 0, in_col1, subvec_n_cols);
}
@@ -706,7 +706,7 @@ Row<eT>::subvec(const span& col_span) const
const uword in_col2 = col_span.b;
const uword subvec_n_cols = col_all ? local_n_cols : in_col2 - in_col1 + 1;
arma_debug_check( ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ), "Row::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( col_all ? false : ((in_col1 > in_col2) || (in_col2 >= local_n_cols)) ), "Row::subvec(): indices out of bounds or incorrectly used" );
return subview_row<eT>(*this, 0, in_col1, subvec_n_cols);
}
@@ -776,7 +776,7 @@ Row<eT>::head(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_cols), "Row::head(): size out of bounds");
arma_debug_check( (N > Mat<eT>::n_cols), "Row::head(): size out of bounds" );
return subview_row<eT>(*this, 0, 0, N);
}
@@ -790,7 +790,7 @@ Row<eT>::head(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_cols), "Row::head(): size out of bounds");
arma_debug_check( (N > Mat<eT>::n_cols), "Row::head(): size out of bounds" );
return subview_row<eT>(*this, 0, 0, N);
}
@@ -804,7 +804,7 @@ Row<eT>::tail(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_cols), "Row::tail(): size out of bounds");
arma_debug_check( (N > Mat<eT>::n_cols), "Row::tail(): size out of bounds" );
const uword start_col = Mat<eT>::n_cols - N;
@@ -820,7 +820,7 @@ Row<eT>::tail(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > Mat<eT>::n_cols), "Row::tail(): size out of bounds");
arma_debug_check( (N > Mat<eT>::n_cols), "Row::tail(): size out of bounds" );
const uword start_col = Mat<eT>::n_cols - N;
@@ -885,7 +885,7 @@ Row<eT>::shed_col(const uword col_num)
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= Mat<eT>::n_cols, "Row::shed_col(): index out of bounds");
arma_debug_check( col_num >= Mat<eT>::n_cols, "Row::shed_col(): index out of bounds" );
shed_cols(col_num, col_num);
}
@@ -958,7 +958,7 @@ Row<eT>::insert_cols(const uword col_num, const uword N, const bool set_to_zero)
const uword B_n_cols = t_n_cols - col_num;
// insertion at col_num == n_cols is in effect an append operation
arma_debug_check( (col_num > t_n_cols), "Row::insert_cols(): index out of bounds");
arma_debug_check( (col_num > t_n_cols), "Row::insert_cols(): index out of bounds" );
if(N > 0)
{
@@ -1054,7 +1054,7 @@ Row<eT>::begin_row(const uword row_num)
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Row::begin_row(): index out of bounds");
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Row::begin_row(): index out of bounds" );
return Mat<eT>::memptr();
}
@@ -1068,7 +1068,7 @@ Row<eT>::begin_row(const uword row_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Row::begin_row(): index out of bounds");
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Row::begin_row(): index out of bounds" );
return Mat<eT>::memptr();
}
@@ -1082,7 +1082,7 @@ Row<eT>::end_row(const uword row_num)
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Row::end_row(): index out of bounds");
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Row::end_row(): index out of bounds" );
return Mat<eT>::memptr() + Mat<eT>::n_cols;
}
@@ -1096,7 +1096,7 @@ Row<eT>::end_row(const uword row_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Row::end_row(): index out of bounds");
arma_debug_check( (row_num >= Mat<eT>::n_rows), "Row::end_row(): index out of bounds" );
return Mat<eT>::memptr() + Mat<eT>::n_cols;
}
@@ -1544,7 +1544,7 @@ arma_warn_unused
eT&
Row<eT>::fixed<fixed_n_elem>::operator() (const uword ii)
{
arma_debug_check( (ii >= fixed_n_elem), "Row::operator(): index out of bounds");
arma_debug_check( (ii >= fixed_n_elem), "Row::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[ii] : Mat<eT>::mem_local[ii];
}
@@ -1558,7 +1558,7 @@ arma_warn_unused
const eT&
Row<eT>::fixed<fixed_n_elem>::operator() (const uword ii) const
{
arma_debug_check( (ii >= fixed_n_elem), "Row::operator(): index out of bounds");
arma_debug_check( (ii >= fixed_n_elem), "Row::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[ii] : Mat<eT>::mem_local[ii];
}
+5 -5
View File
@@ -238,7 +238,7 @@ SpCol<eT>::shed_row(const uword row_num)
{
arma_extra_debug_sigprint();
arma_debug_check( row_num >= SpMat<eT>::n_rows, "SpCol::shed_row(): out of bounds");
arma_debug_check( row_num >= SpMat<eT>::n_rows, "SpCol::shed_row(): out of bounds" );
shed_rows(row_num, row_num);
}
@@ -364,7 +364,7 @@ SpCol<eT>::begin_row(const uword row_num)
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= SpMat<eT>::n_rows), "SpCol::begin_row(): index out of bounds");
arma_debug_check( (row_num >= SpMat<eT>::n_rows), "SpCol::begin_row(): index out of bounds" );
SpMat<eT>::sync_csc();
@@ -380,7 +380,7 @@ SpCol<eT>::begin_row(const uword row_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= SpMat<eT>::n_rows), "SpCol::begin_row(): index out of bounds");
arma_debug_check( (row_num >= SpMat<eT>::n_rows), "SpCol::begin_row(): index out of bounds" );
SpMat<eT>::sync_csc();
@@ -396,7 +396,7 @@ SpCol<eT>::end_row(const uword row_num)
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= SpMat<eT>::n_rows), "SpCol::end_row(): index out of bounds");
arma_debug_check( (row_num >= SpMat<eT>::n_rows), "SpCol::end_row(): index out of bounds" );
SpMat<eT>::sync_csc();
@@ -412,7 +412,7 @@ SpCol<eT>::end_row(const uword row_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( (row_num >= SpMat<eT>::n_rows), "SpCol::end_row(): index out of bounds");
arma_debug_check( (row_num >= SpMat<eT>::n_rows), "SpCol::end_row(): index out of bounds" );
SpMat<eT>::sync_csc();
+12 -12
View File
@@ -2721,7 +2721,7 @@ SpMat<eT>::head_rows(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_rows), "SpMat::head_rows(): size out of bounds");
arma_debug_check( (N > n_rows), "SpMat::head_rows(): size out of bounds" );
return SpSubview<eT>(*this, 0, 0, N, n_cols);
}
@@ -2735,7 +2735,7 @@ SpMat<eT>::head_rows(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_rows), "SpMat::head_rows(): size out of bounds");
arma_debug_check( (N > n_rows), "SpMat::head_rows(): size out of bounds" );
return SpSubview<eT>(*this, 0, 0, N, n_cols);
}
@@ -2749,7 +2749,7 @@ SpMat<eT>::tail_rows(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_rows), "SpMat::tail_rows(): size out of bounds");
arma_debug_check( (N > n_rows), "SpMat::tail_rows(): size out of bounds" );
const uword start_row = n_rows - N;
@@ -2765,7 +2765,7 @@ SpMat<eT>::tail_rows(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_rows), "SpMat::tail_rows(): size out of bounds");
arma_debug_check( (N > n_rows), "SpMat::tail_rows(): size out of bounds" );
const uword start_row = n_rows - N;
@@ -2781,7 +2781,7 @@ SpMat<eT>::head_cols(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_cols), "SpMat::head_cols(): size out of bounds");
arma_debug_check( (N > n_cols), "SpMat::head_cols(): size out of bounds" );
return SpSubview<eT>(*this, 0, 0, n_rows, N);
}
@@ -2795,7 +2795,7 @@ SpMat<eT>::head_cols(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_cols), "SpMat::head_cols(): size out of bounds");
arma_debug_check( (N > n_cols), "SpMat::head_cols(): size out of bounds" );
return SpSubview<eT>(*this, 0, 0, n_rows, N);
}
@@ -2809,7 +2809,7 @@ SpMat<eT>::tail_cols(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_cols), "SpMat::tail_cols(): size out of bounds");
arma_debug_check( (N > n_cols), "SpMat::tail_cols(): size out of bounds" );
const uword start_col = n_cols - N;
@@ -2825,7 +2825,7 @@ SpMat<eT>::tail_cols(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > n_cols), "SpMat::tail_cols(): size out of bounds");
arma_debug_check( (N > n_cols), "SpMat::tail_cols(): size out of bounds" );
const uword start_col = n_cols - N;
@@ -3299,7 +3299,7 @@ arma_warn_unused
SpMat_MapMat_val<eT>
SpMat<eT>::operator()(const uword i)
{
arma_debug_check( (i >= n_elem), "SpMat::operator(): out of bounds");
arma_debug_check( (i >= n_elem), "SpMat::operator(): out of bounds" );
const uword in_col = i / n_rows;
const uword in_row = i % n_rows;
@@ -3315,7 +3315,7 @@ arma_warn_unused
eT
SpMat<eT>::operator()(const uword i) const
{
arma_debug_check( (i >= n_elem), "SpMat::operator(): out of bounds");
arma_debug_check( (i >= n_elem), "SpMat::operator(): out of bounds" );
return get_value(i);
}
@@ -3355,7 +3355,7 @@ arma_warn_unused
SpMat_MapMat_val<eT>
SpMat<eT>::operator()(const uword in_row, const uword in_col)
{
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "SpMat::operator(): out of bounds");
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "SpMat::operator(): out of bounds" );
return SpMat_MapMat_val<eT>((*this), cache, in_row, in_col);
}
@@ -3368,7 +3368,7 @@ arma_warn_unused
eT
SpMat<eT>::operator()(const uword in_row, const uword in_col) const
{
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "SpMat::operator(): out of bounds");
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "SpMat::operator(): out of bounds" );
return get_value(in_row, in_col);
}
+3 -3
View File
@@ -238,7 +238,7 @@ SpRow<eT>::shed_col(const uword col_num)
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= SpMat<eT>::n_cols, "SpRow::shed_col(): out of bounds");
arma_debug_check( col_num >= SpMat<eT>::n_cols, "SpRow::shed_col(): out of bounds" );
shed_cols(col_num, col_num);
}
@@ -336,9 +336,9 @@ SpRow<eT>::shed_cols(const uword in_col1, const uword in_col2)
// arma_extra_debug_sigprint();
//
// // insertion at col_num == n_cols is in effect an append operation
// arma_debug_check( (col_num > SpMat<eT>::n_cols), "SpRow::insert_cols(): out of bounds");
// arma_debug_check( (col_num > SpMat<eT>::n_cols), "SpRow::insert_cols(): out of bounds" );
//
// arma_debug_check( (set_to_zero == false), "SpRow::insert_cols(): cannot set elements to nonzero values");
// arma_debug_check( (set_to_zero == false), "SpRow::insert_cols(): cannot set elements to nonzero values" );
//
// uword newVal = (col_num == 0) ? 0 : SpMat<eT>::col_ptrs[col_num];
// SpMat<eT>::col_ptrs.insert(col_num, N, newVal);
+4 -4
View File
@@ -912,7 +912,7 @@ inline
SpSubview_MapMat_val<eT>
SpSubview<eT>::operator()(const uword i)
{
arma_debug_check( (i >= n_elem), "SpSubview::operator(): index out of bounds");
arma_debug_check( (i >= n_elem), "SpSubview::operator(): index out of bounds" );
const uword lrow = i % n_rows;
const uword lcol = i / n_rows;
@@ -928,7 +928,7 @@ inline
eT
SpSubview<eT>::operator()(const uword i) const
{
arma_debug_check( (i >= n_elem), "SpSubview::operator(): index out of bounds");
arma_debug_check( (i >= n_elem), "SpSubview::operator(): index out of bounds" );
const uword lrow = i % n_rows;
const uword lcol = i / n_rows;
@@ -944,7 +944,7 @@ inline
SpSubview_MapMat_val<eT>
SpSubview<eT>::operator()(const uword in_row, const uword in_col)
{
arma_debug_check( (in_row >= n_rows) || (in_col >= n_cols), "SpSubview::operator(): index out of bounds");
arma_debug_check( (in_row >= n_rows) || (in_col >= n_cols), "SpSubview::operator(): index out of bounds" );
return (*this).at(in_row, in_col);
}
@@ -957,7 +957,7 @@ inline
eT
SpSubview<eT>::operator()(const uword in_row, const uword in_col) const
{
arma_debug_check( (in_row >= n_rows) || (in_col >= n_cols), "SpSubview::operator(): index out of bounds");
arma_debug_check( (in_row >= n_rows) || (in_col >= n_cols), "SpSubview::operator(): index out of bounds" );
return (*this).at(in_row, in_col);
}
+1 -1
View File
@@ -86,7 +86,7 @@ diagview<eT>::operator= (const diagview<eT>& x)
diagview<eT>& d = *this;
arma_debug_check( (d.n_elem != x.n_elem), "diagview: diagonals have incompatible lengths");
arma_debug_check( (d.n_elem != x.n_elem), "diagview: diagonals have incompatible lengths" );
Mat<eT>& d_m = const_cast< Mat<eT>& >(d.m);
const Mat<eT>& x_m = x.m;
+2 -2
View File
@@ -34,7 +34,7 @@ lu
arma_extra_debug_sigprint();
arma_ignore(junk);
arma_debug_check( (&L == &U), "lu(): L and U are the same object");
arma_debug_check( (&L == &U), "lu(): L and U are the same object" );
const bool status = auxlib::lu(L, U, X);
@@ -66,7 +66,7 @@ lu
arma_extra_debug_sigprint();
arma_ignore(junk);
arma_debug_check( ( (&L == &U) || (&L == &P) || (&U == &P) ), "lu(): two or more output objects are the same object");
arma_debug_check( ( (&L == &U) || (&L == &P) || (&U == &P) ), "lu(): two or more output objects are the same object" );
const bool status = auxlib::lu(L, U, P, X);
+3 -3
View File
@@ -34,7 +34,7 @@ qr
arma_extra_debug_sigprint();
arma_ignore(junk);
arma_debug_check( (&Q == &R), "qr(): Q and R are the same object");
arma_debug_check( (&Q == &R), "qr(): Q and R are the same object" );
const bool status = auxlib::qr(Q, R, X);
@@ -65,7 +65,7 @@ qr_econ
arma_extra_debug_sigprint();
arma_ignore(junk);
arma_debug_check( (&Q == &R), "qr_econ(): Q and R are the same object");
arma_debug_check( (&Q == &R), "qr_econ(): Q and R are the same object" );
const bool status = auxlib::qr_econ(Q, R, X);
@@ -96,7 +96,7 @@ qr
{
arma_extra_debug_sigprint();
arma_debug_check( (&Q == &R), "qr(): Q and R are the same object");
arma_debug_check( (&Q == &R), "qr(): Q and R are the same object" );
const char sig = (P_mode != nullptr) ? P_mode[0] : char(0);
+2 -2
View File
@@ -118,7 +118,7 @@ randperm(const uword N, const uword M)
{
arma_extra_debug_sigprint();
arma_debug_check( (M > N), "randperm(): 'M' must be less than or equal to 'N'");
arma_debug_check( (M > N), "randperm(): 'M' must be less than or equal to 'N'" );
obj_type x;
@@ -136,7 +136,7 @@ randperm(const uword N, const uword M)
{
arma_extra_debug_sigprint();
arma_debug_check( (M > N), "randperm(): 'M' must be less than or equal to 'N'");
arma_debug_check( (M > N), "randperm(): 'M' must be less than or equal to 'N'" );
uvec x;
+3 -3
View File
@@ -80,7 +80,7 @@ sort
const char sig = (sort_direction != nullptr) ? sort_direction[0] : char(0);
arma_debug_check( (sig != 'a') && (sig != 'd'), "sort(): unknown sort direction");
arma_debug_check( (sig != 'a') && (sig != 'd'), "sort(): unknown sort direction" );
const uword sort_type = (sig == 'a') ? 0 : 1;
@@ -108,7 +108,7 @@ sort
const char sig = (sort_direction != nullptr) ? sort_direction[0] : char(0);
arma_debug_check( (sig != 'a') && (sig != 'd'), "sort(): unknown sort direction");
arma_debug_check( (sig != 'a') && (sig != 'd'), "sort(): unknown sort direction" );
const uword sort_type = (sig == 'a') ? 0 : 1;
@@ -137,7 +137,7 @@ sort
const char sig = (sort_direction != nullptr) ? sort_direction[0] : char(0);
arma_debug_check( (sig != 'a') && (sig != 'd'), "sort(): unknown sort direction");
arma_debug_check( (sig != 'a') && (sig != 'd'), "sort(): unknown sort direction" );
const uword sort_type = (sig == 'a') ? 0 : 1;
+1 -1
View File
@@ -29,7 +29,7 @@ op_index_max::apply(Mat<uword>& out, const mtOp<uword,T1,op_index_max>& in)
typedef typename T1::elem_type eT;
const uword dim = in.aux_uword_a;
arma_debug_check( (dim > 1), "index_max(): parameter 'dim' must be 0 or 1");
arma_debug_check( (dim > 1), "index_max(): parameter 'dim' must be 0 or 1" );
const quasi_unwrap<T1> U(in.m);
const Mat<eT>& X = U.M;
+1 -1
View File
@@ -29,7 +29,7 @@ op_index_min::apply(Mat<uword>& out, const mtOp<uword,T1,op_index_min>& in)
typedef typename T1::elem_type eT;
const uword dim = in.aux_uword_a;
arma_debug_check( (dim > 1), "index_min(): parameter 'dim' must be 0 or 1");
arma_debug_check( (dim > 1), "index_min(): parameter 'dim' must be 0 or 1" );
const quasi_unwrap<T1> U(in.m);
const Mat<eT>& X = U.M;
+1 -1
View File
@@ -29,7 +29,7 @@ op_max::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_max>& in)
typedef typename T1::elem_type eT;
const uword dim = in.aux_uword_a;
arma_debug_check( (dim > 1), "max(): parameter 'dim' must be 0 or 1");
arma_debug_check( (dim > 1), "max(): parameter 'dim' must be 0 or 1" );
const quasi_unwrap<T1> U(in.m);
const Mat<eT>& X = U.M;
+1 -1
View File
@@ -29,7 +29,7 @@ op_min::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_min>& in)
typedef typename T1::elem_type eT;
const uword dim = in.aux_uword_a;
arma_debug_check( (dim > 1), "min(): parameter 'dim' must be 0 or 1");
arma_debug_check( (dim > 1), "min(): parameter 'dim' must be 0 or 1" );
const quasi_unwrap<T1> U(in.m);
const Mat<eT>& X = U.M;
+1 -1
View File
@@ -29,7 +29,7 @@ op_range::apply(Mat<typename T1::elem_type>& out, const Op<T1,op_range>& in)
typedef typename T1::elem_type eT;
const uword dim = in.aux_uword_a;
arma_debug_check( (dim > 1), "range(): parameter 'dim' must be 0 or 1");
arma_debug_check( (dim > 1), "range(): parameter 'dim' must be 0 or 1" );
const quasi_unwrap<T1> U(in.m);
const Mat<eT>& X = U.M;
+2 -2
View File
@@ -193,7 +193,7 @@ arma_inline
eT
podarray<eT>::operator() (const uword i) const
{
arma_debug_check( (i >= n_elem), "podarray::operator(): index out of bounds");
arma_debug_check( (i >= n_elem), "podarray::operator(): index out of bounds" );
return mem[i];
}
@@ -205,7 +205,7 @@ arma_inline
eT&
podarray<eT>::operator() (const uword i)
{
arma_debug_check( (i >= n_elem), "podarray::operator(): index out of bounds");
arma_debug_check( (i >= n_elem), "podarray::operator(): index out of bounds" );
return access::rw(mem[i]);
}
@@ -427,7 +427,7 @@ running_stat_vec_aux::update_stats
}
else
{
arma_debug_check( (sample.is_vec() == false), "running_stat_vec(): given sample is not a vector");
arma_debug_check( (sample.is_vec() == false), "running_stat_vec(): given sample is not a vector" );
x.r_mean.set_size(sample.n_rows, sample.n_cols);
@@ -588,7 +588,7 @@ running_stat_vec_aux::update_stats
}
else
{
arma_debug_check( (sample.is_vec() == false), "running_stat_vec(): given sample is not a vector");
arma_debug_check( (sample.is_vec() == false), "running_stat_vec(): given sample is not a vector" );
x.r_mean.set_size(sample.n_rows, sample.n_cols);
+31 -31
View File
@@ -1217,7 +1217,7 @@ inline
eT&
subview<eT>::operator()(const uword ii)
{
arma_debug_check( (ii >= n_elem), "subview::operator(): index out of bounds");
arma_debug_check( (ii >= n_elem), "subview::operator(): index out of bounds" );
const uword in_col = ii / n_rows;
const uword in_row = ii % n_rows;
@@ -1234,7 +1234,7 @@ inline
eT
subview<eT>::operator()(const uword ii) const
{
arma_debug_check( (ii >= n_elem), "subview::operator(): index out of bounds");
arma_debug_check( (ii >= n_elem), "subview::operator(): index out of bounds" );
const uword in_col = ii / n_rows;
const uword in_row = ii % n_rows;
@@ -1251,7 +1251,7 @@ inline
eT&
subview<eT>::operator()(const uword in_row, const uword in_col)
{
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "subview::operator(): index out of bounds");
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "subview::operator(): index out of bounds" );
const uword index = (in_col + aux_col1)*m.n_rows + aux_row1 + in_row;
@@ -1265,7 +1265,7 @@ inline
eT
subview<eT>::operator()(const uword in_row, const uword in_col) const
{
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "subview::operator(): index out of bounds");
arma_debug_check( ((in_row >= n_rows) || (in_col >= n_cols)), "subview::operator(): index out of bounds" );
const uword index = (in_col + aux_col1)*m.n_rows + aux_row1 + in_row;
@@ -1874,7 +1874,7 @@ subview<eT>::col(const uword col_num)
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= n_cols, "subview::col(): out of bounds");
arma_debug_check( col_num >= n_cols, "subview::col(): out of bounds" );
const uword base_col = aux_col1 + col_num;
@@ -1891,7 +1891,7 @@ subview<eT>::col(const uword col_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= n_cols, "subview::col(): out of bounds");
arma_debug_check( col_num >= n_cols, "subview::col(): out of bounds" );
const uword base_col = aux_col1 + col_num;
@@ -1976,7 +1976,7 @@ subview<eT>::unsafe_col(const uword col_num)
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= n_cols, "subview::unsafe_col(): out of bounds");
arma_debug_check( col_num >= n_cols, "subview::unsafe_col(): out of bounds" );
return Col<eT>(colptr(col_num), n_rows, false, true);
}
@@ -1995,7 +1995,7 @@ subview<eT>::unsafe_col(const uword col_num) const
{
arma_extra_debug_sigprint();
arma_debug_check( col_num >= n_cols, "subview::unsafe_col(): out of bounds");
arma_debug_check( col_num >= n_cols, "subview::unsafe_col(): out of bounds" );
return Col<eT>(const_cast<eT*>(colptr(col_num)), n_rows, false, true);
}
@@ -3439,7 +3439,7 @@ inline
eT&
subview_col<eT>::operator()(const uword ii)
{
arma_debug_check( (ii >= subview<eT>::n_elem), "subview::operator(): index out of bounds");
arma_debug_check( (ii >= subview<eT>::n_elem), "subview::operator(): index out of bounds" );
return access::rw( colmem[ii] );
}
@@ -3451,7 +3451,7 @@ inline
eT
subview_col<eT>::operator()(const uword ii) const
{
arma_debug_check( (ii >= subview<eT>::n_elem), "subview::operator(): index out of bounds");
arma_debug_check( (ii >= subview<eT>::n_elem), "subview::operator(): index out of bounds" );
return colmem[ii];
}
@@ -3463,7 +3463,7 @@ inline
eT&
subview_col<eT>::operator()(const uword in_row, const uword in_col)
{
arma_debug_check( ((in_row >= subview<eT>::n_rows) || (in_col > 0)), "subview::operator(): index out of bounds");
arma_debug_check( ((in_row >= subview<eT>::n_rows) || (in_col > 0)), "subview::operator(): index out of bounds" );
return access::rw( colmem[in_row] );
}
@@ -3475,7 +3475,7 @@ inline
eT
subview_col<eT>::operator()(const uword in_row, const uword in_col) const
{
arma_debug_check( ((in_row >= subview<eT>::n_rows) || (in_col > 0)), "subview::operator(): index out of bounds");
arma_debug_check( ((in_row >= subview<eT>::n_rows) || (in_col > 0)), "subview::operator(): index out of bounds" );
return colmem[in_row];
}
@@ -3527,7 +3527,7 @@ subview_col<eT>::rows(const uword in_row1, const uword in_row2)
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview<eT>::n_rows) ), "subview_col::rows(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview<eT>::n_rows) ), "subview_col::rows(): indices out of bounds or incorrectly used" );
const uword subview_n_rows = in_row2 - in_row1 + 1;
@@ -3545,7 +3545,7 @@ subview_col<eT>::rows(const uword in_row1, const uword in_row2) const
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview<eT>::n_rows) ), "subview_col::rows(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview<eT>::n_rows) ), "subview_col::rows(): indices out of bounds or incorrectly used" );
const uword subview_n_rows = in_row2 - in_row1 + 1;
@@ -3563,7 +3563,7 @@ subview_col<eT>::subvec(const uword in_row1, const uword in_row2)
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview<eT>::n_rows) ), "subview_col::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview<eT>::n_rows) ), "subview_col::subvec(): indices out of bounds or incorrectly used" );
const uword subview_n_rows = in_row2 - in_row1 + 1;
@@ -3581,7 +3581,7 @@ subview_col<eT>::subvec(const uword in_row1, const uword in_row2) const
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview<eT>::n_rows) ), "subview_col::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview<eT>::n_rows) ), "subview_col::subvec(): indices out of bounds or incorrectly used" );
const uword subview_n_rows = in_row2 - in_row1 + 1;
@@ -3635,7 +3635,7 @@ subview_col<eT>::head(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::head(): size out of bounds");
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::head(): size out of bounds" );
return subview_col<eT>(this->m, this->aux_col1, this->aux_row1, N);
}
@@ -3649,7 +3649,7 @@ subview_col<eT>::head(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::head(): size out of bounds");
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::head(): size out of bounds" );
return subview_col<eT>(this->m, this->aux_col1, this->aux_row1, N);
}
@@ -3663,7 +3663,7 @@ subview_col<eT>::tail(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::tail(): size out of bounds");
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::tail(): size out of bounds" );
const uword start_row = subview<eT>::aux_row1 + subview<eT>::n_rows - N;
@@ -3679,7 +3679,7 @@ subview_col<eT>::tail(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::tail(): size out of bounds");
arma_debug_check( (N > subview<eT>::n_rows), "subview_col::tail(): size out of bounds" );
const uword start_row = subview<eT>::aux_row1 + subview<eT>::n_rows - N;
@@ -4035,7 +4035,7 @@ inline
eT&
subview_row<eT>::operator()(const uword ii)
{
arma_debug_check( (ii >= subview<eT>::n_elem), "subview::operator(): index out of bounds");
arma_debug_check( (ii >= subview<eT>::n_elem), "subview::operator(): index out of bounds" );
const uword index = (ii + (subview<eT>::aux_col1))*(subview<eT>::m).n_rows + (subview<eT>::aux_row1);
@@ -4049,7 +4049,7 @@ inline
eT
subview_row<eT>::operator()(const uword ii) const
{
arma_debug_check( (ii >= subview<eT>::n_elem), "subview::operator(): index out of bounds");
arma_debug_check( (ii >= subview<eT>::n_elem), "subview::operator(): index out of bounds" );
const uword index = (ii + (subview<eT>::aux_col1))*(subview<eT>::m).n_rows + (subview<eT>::aux_row1);
@@ -4063,7 +4063,7 @@ inline
eT&
subview_row<eT>::operator()(const uword in_row, const uword in_col)
{
arma_debug_check( ((in_row > 0) || (in_col >= subview<eT>::n_cols)), "subview::operator(): index out of bounds");
arma_debug_check( ((in_row > 0) || (in_col >= subview<eT>::n_cols)), "subview::operator(): index out of bounds" );
const uword index = (in_col + (subview<eT>::aux_col1))*(subview<eT>::m).n_rows + (subview<eT>::aux_row1);
@@ -4077,7 +4077,7 @@ inline
eT
subview_row<eT>::operator()(const uword in_row, const uword in_col) const
{
arma_debug_check( ((in_row > 0) || (in_col >= subview<eT>::n_cols)), "subview::operator(): index out of bounds");
arma_debug_check( ((in_row > 0) || (in_col >= subview<eT>::n_cols)), "subview::operator(): index out of bounds" );
const uword index = (in_col + (subview<eT>::aux_col1))*(subview<eT>::m).n_rows + (subview<eT>::aux_row1);
@@ -4135,7 +4135,7 @@ subview_row<eT>::cols(const uword in_col1, const uword in_col2) const
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview<eT>::n_cols) ), "subview_row::cols(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview<eT>::n_cols) ), "subview_row::cols(): indices out of bounds or incorrectly used" );
const uword subview_n_cols = in_col2 - in_col1 + 1;
@@ -4153,7 +4153,7 @@ subview_row<eT>::subvec(const uword in_col1, const uword in_col2)
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview<eT>::n_cols) ), "subview_row::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview<eT>::n_cols) ), "subview_row::subvec(): indices out of bounds or incorrectly used" );
const uword subview_n_cols = in_col2 - in_col1 + 1;
@@ -4171,7 +4171,7 @@ subview_row<eT>::subvec(const uword in_col1, const uword in_col2) const
{
arma_extra_debug_sigprint();
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview<eT>::n_cols) ), "subview_row::subvec(): indices out of bounds or incorrectly used");
arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview<eT>::n_cols) ), "subview_row::subvec(): indices out of bounds or incorrectly used" );
const uword subview_n_cols = in_col2 - in_col1 + 1;
@@ -4225,7 +4225,7 @@ subview_row<eT>::head(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::head(): size out of bounds");
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::head(): size out of bounds" );
return subview_row<eT>(this->m, this->aux_row1, this->aux_col1, N);
}
@@ -4239,7 +4239,7 @@ subview_row<eT>::head(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::head(): size out of bounds");
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::head(): size out of bounds" );
return subview_row<eT>(this->m, this->aux_row1, this->aux_col1, N);
}
@@ -4253,7 +4253,7 @@ subview_row<eT>::tail(const uword N)
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::tail(): size out of bounds");
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::tail(): size out of bounds" );
const uword start_col = subview<eT>::aux_col1 + subview<eT>::n_cols - N;
@@ -4269,7 +4269,7 @@ subview_row<eT>::tail(const uword N) const
{
arma_extra_debug_sigprint();
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::tail(): size out of bounds");
arma_debug_check( (N > subview<eT>::n_cols), "subview_row::tail(): size out of bounds" );
const uword start_col = subview<eT>::aux_col1 + subview<eT>::n_cols - N;