From 8fa243c3d0d9d2cd55c0ea3a733c7c52b8e3eb86 Mon Sep 17 00:00:00 2001 From: conrad Date: Thu, 28 Jan 2021 12:26:13 +1000 Subject: [PATCH] consistent layout for arma_debug_check() --- include/armadillo_bits/Col_meat.hpp | 40 ++++++------ include/armadillo_bits/Cube_meat.hpp | 34 +++++----- include/armadillo_bits/Mat_meat.hpp | 58 ++++++++--------- include/armadillo_bits/Row_meat.hpp | 40 ++++++------ include/armadillo_bits/SpCol_meat.hpp | 10 +-- include/armadillo_bits/SpMat_meat.hpp | 24 +++---- include/armadillo_bits/SpRow_meat.hpp | 6 +- include/armadillo_bits/SpSubview_meat.hpp | 8 +-- include/armadillo_bits/diagview_meat.hpp | 2 +- include/armadillo_bits/fn_lu.hpp | 4 +- include/armadillo_bits/fn_qr.hpp | 6 +- include/armadillo_bits/fn_randperm.hpp | 4 +- include/armadillo_bits/fn_sort.hpp | 6 +- include/armadillo_bits/op_index_max_meat.hpp | 2 +- include/armadillo_bits/op_index_min_meat.hpp | 2 +- include/armadillo_bits/op_max_meat.hpp | 2 +- include/armadillo_bits/op_min_meat.hpp | 2 +- include/armadillo_bits/op_range_meat.hpp | 2 +- include/armadillo_bits/podarray_meat.hpp | 4 +- .../armadillo_bits/running_stat_vec_meat.hpp | 4 +- include/armadillo_bits/subview_meat.hpp | 62 +++++++++---------- 21 files changed, 161 insertions(+), 161 deletions(-) diff --git a/include/armadillo_bits/Col_meat.hpp b/include/armadillo_bits/Col_meat.hpp index 59327842..4b130df9 100644 --- a/include/armadillo_bits/Col_meat.hpp +++ b/include/armadillo_bits/Col_meat.hpp @@ -560,7 +560,7 @@ Col::row(const uword in_row1) { arma_extra_debug_sigprint(); - arma_debug_check( (in_row1 >= Mat::n_rows), "Col::row(): indices out of bounds or incorrectly used"); + arma_debug_check( (in_row1 >= Mat::n_rows), "Col::row(): indices out of bounds or incorrectly used" ); return subview_col(*this, 0, in_row1, 1); } @@ -574,7 +574,7 @@ Col::row(const uword in_row1) const { arma_extra_debug_sigprint(); - arma_debug_check( (in_row1 >= Mat::n_rows), "Col::row(): indices out of bounds or incorrectly used"); + arma_debug_check( (in_row1 >= Mat::n_rows), "Col::row(): indices out of bounds or incorrectly used" ); return subview_col(*this, 0, in_row1, 1); } @@ -588,7 +588,7 @@ Col::rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::n_rows) ), "Col::rows(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::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::rows(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::n_rows) ), "Col::rows(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::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::subvec(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::n_rows) ), "Col::subvec(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::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::subvec(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::n_rows) ), "Col::subvec(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= Mat::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::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(*this, 0, in_row1, subvec_n_rows); } @@ -706,7 +706,7 @@ Col::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(*this, 0, in_row1, subvec_n_rows); } @@ -776,7 +776,7 @@ Col::head(const uword N) { arma_extra_debug_sigprint(); - arma_debug_check( (N > Mat::n_rows), "Col::head(): size out of bounds"); + arma_debug_check( (N > Mat::n_rows), "Col::head(): size out of bounds" ); return subview_col(*this, 0, 0, N); } @@ -790,7 +790,7 @@ Col::head(const uword N) const { arma_extra_debug_sigprint(); - arma_debug_check( (N > Mat::n_rows), "Col::head(): size out of bounds"); + arma_debug_check( (N > Mat::n_rows), "Col::head(): size out of bounds" ); return subview_col(*this, 0, 0, N); } @@ -804,7 +804,7 @@ Col::tail(const uword N) { arma_extra_debug_sigprint(); - arma_debug_check( (N > Mat::n_rows), "Col::tail(): size out of bounds"); + arma_debug_check( (N > Mat::n_rows), "Col::tail(): size out of bounds" ); const uword start_row = Mat::n_rows - N; @@ -820,7 +820,7 @@ Col::tail(const uword N) const { arma_extra_debug_sigprint(); - arma_debug_check( (N > Mat::n_rows), "Col::tail(): size out of bounds"); + arma_debug_check( (N > Mat::n_rows), "Col::tail(): size out of bounds" ); const uword start_row = Mat::n_rows - N; @@ -885,7 +885,7 @@ Col::shed_row(const uword row_num) { arma_extra_debug_sigprint(); - arma_debug_check( row_num >= Mat::n_rows, "Col::shed_row(): index out of bounds"); + arma_debug_check( row_num >= Mat::n_rows, "Col::shed_row(): index out of bounds" ); shed_rows(row_num, row_num); } @@ -958,7 +958,7 @@ Col::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::begin_row(const uword row_num) { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= Mat::n_rows), "Col::begin_row(): index out of bounds"); + arma_debug_check( (row_num >= Mat::n_rows), "Col::begin_row(): index out of bounds" ); return Mat::memptr() + row_num; } @@ -1068,7 +1068,7 @@ Col::begin_row(const uword row_num) const { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= Mat::n_rows), "Col::begin_row(): index out of bounds"); + arma_debug_check( (row_num >= Mat::n_rows), "Col::begin_row(): index out of bounds" ); return Mat::memptr() + row_num; } @@ -1082,7 +1082,7 @@ Col::end_row(const uword row_num) { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= Mat::n_rows), "Col::end_row(): index out of bounds"); + arma_debug_check( (row_num >= Mat::n_rows), "Col::end_row(): index out of bounds" ); return Mat::memptr() + row_num + 1; } @@ -1096,7 +1096,7 @@ Col::end_row(const uword row_num) const { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= Mat::n_rows), "Col::end_row(): index out of bounds"); + arma_debug_check( (row_num >= Mat::n_rows), "Col::end_row(): index out of bounds" ); return Mat::memptr() + row_num + 1; } @@ -1544,7 +1544,7 @@ arma_warn_unused eT& Col::fixed::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::mem_local[ii]; } @@ -1558,7 +1558,7 @@ arma_warn_unused const eT& Col::fixed::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::mem_local[ii]; } diff --git a/include/armadillo_bits/Cube_meat.hpp b/include/armadillo_bits/Cube_meat.hpp index 1b084b59..21b21437 100644 --- a/include/armadillo_bits/Cube_meat.hpp +++ b/include/armadillo_bits/Cube_meat.hpp @@ -1925,7 +1925,7 @@ Cube::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::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::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::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::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::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::insert_rows(const uword row_num, const BaseCube& 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::insert_cols(const uword col_num, const BaseCube& 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::insert_slices(const uword slice_num, const BaseCube& 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::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::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::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::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::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::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::fixed::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::fixed::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]; } diff --git a/include/armadillo_bits/Mat_meat.hpp b/include/armadillo_bits/Mat_meat.hpp index 0c61ffd2..4feb52c1 100644 --- a/include/armadillo_bits/Mat_meat.hpp +++ b/include/armadillo_bits/Mat_meat.hpp @@ -26,7 +26,7 @@ Mat::~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::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(*this, col_num); } @@ -2989,7 +2989,7 @@ Mat::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(*this, col_num); } @@ -3066,7 +3066,7 @@ Mat::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(colptr(col_num), n_rows, false, true); } @@ -3085,7 +3085,7 @@ Mat::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 out_type; @@ -3511,7 +3511,7 @@ Mat::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(*this, 0, 0, N, n_cols); } @@ -3525,7 +3525,7 @@ Mat::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(*this, 0, 0, N, n_cols); } @@ -3539,7 +3539,7 @@ Mat::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::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::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(*this, 0, 0, n_rows, N); } @@ -3585,7 +3585,7 @@ Mat::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(*this, 0, 0, n_rows, N); } @@ -3599,7 +3599,7 @@ Mat::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::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::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::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::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::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::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::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::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::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::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::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::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::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::fixed::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::fixed::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::fixed::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::fixed::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; diff --git a/include/armadillo_bits/Row_meat.hpp b/include/armadillo_bits/Row_meat.hpp index a0290ea7..6af0cf33 100644 --- a/include/armadillo_bits/Row_meat.hpp +++ b/include/armadillo_bits/Row_meat.hpp @@ -560,7 +560,7 @@ Row::col(const uword in_col1) { arma_extra_debug_sigprint(); - arma_debug_check( (in_col1 >= Mat::n_cols), "Row::col(): indices out of bounds or incorrectly used"); + arma_debug_check( (in_col1 >= Mat::n_cols), "Row::col(): indices out of bounds or incorrectly used" ); return subview_row(*this, 0, in_col1, 1); } @@ -574,7 +574,7 @@ Row::col(const uword in_col1) const { arma_extra_debug_sigprint(); - arma_debug_check( (in_col1 >= Mat::n_cols), "Row::col(): indices out of bounds or incorrectly used"); + arma_debug_check( (in_col1 >= Mat::n_cols), "Row::col(): indices out of bounds or incorrectly used" ); return subview_row(*this, 0, in_col1, 1); } @@ -588,7 +588,7 @@ Row::cols(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::n_cols) ), "Row::cols(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::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::cols(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::n_cols) ), "Row::cols(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::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::subvec(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::n_cols) ), "Row::subvec(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::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::subvec(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::n_cols) ), "Row::subvec(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= Mat::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::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(*this, 0, in_col1, subvec_n_cols); } @@ -706,7 +706,7 @@ Row::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(*this, 0, in_col1, subvec_n_cols); } @@ -776,7 +776,7 @@ Row::head(const uword N) { arma_extra_debug_sigprint(); - arma_debug_check( (N > Mat::n_cols), "Row::head(): size out of bounds"); + arma_debug_check( (N > Mat::n_cols), "Row::head(): size out of bounds" ); return subview_row(*this, 0, 0, N); } @@ -790,7 +790,7 @@ Row::head(const uword N) const { arma_extra_debug_sigprint(); - arma_debug_check( (N > Mat::n_cols), "Row::head(): size out of bounds"); + arma_debug_check( (N > Mat::n_cols), "Row::head(): size out of bounds" ); return subview_row(*this, 0, 0, N); } @@ -804,7 +804,7 @@ Row::tail(const uword N) { arma_extra_debug_sigprint(); - arma_debug_check( (N > Mat::n_cols), "Row::tail(): size out of bounds"); + arma_debug_check( (N > Mat::n_cols), "Row::tail(): size out of bounds" ); const uword start_col = Mat::n_cols - N; @@ -820,7 +820,7 @@ Row::tail(const uword N) const { arma_extra_debug_sigprint(); - arma_debug_check( (N > Mat::n_cols), "Row::tail(): size out of bounds"); + arma_debug_check( (N > Mat::n_cols), "Row::tail(): size out of bounds" ); const uword start_col = Mat::n_cols - N; @@ -885,7 +885,7 @@ Row::shed_col(const uword col_num) { arma_extra_debug_sigprint(); - arma_debug_check( col_num >= Mat::n_cols, "Row::shed_col(): index out of bounds"); + arma_debug_check( col_num >= Mat::n_cols, "Row::shed_col(): index out of bounds" ); shed_cols(col_num, col_num); } @@ -958,7 +958,7 @@ Row::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::begin_row(const uword row_num) { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= Mat::n_rows), "Row::begin_row(): index out of bounds"); + arma_debug_check( (row_num >= Mat::n_rows), "Row::begin_row(): index out of bounds" ); return Mat::memptr(); } @@ -1068,7 +1068,7 @@ Row::begin_row(const uword row_num) const { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= Mat::n_rows), "Row::begin_row(): index out of bounds"); + arma_debug_check( (row_num >= Mat::n_rows), "Row::begin_row(): index out of bounds" ); return Mat::memptr(); } @@ -1082,7 +1082,7 @@ Row::end_row(const uword row_num) { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= Mat::n_rows), "Row::end_row(): index out of bounds"); + arma_debug_check( (row_num >= Mat::n_rows), "Row::end_row(): index out of bounds" ); return Mat::memptr() + Mat::n_cols; } @@ -1096,7 +1096,7 @@ Row::end_row(const uword row_num) const { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= Mat::n_rows), "Row::end_row(): index out of bounds"); + arma_debug_check( (row_num >= Mat::n_rows), "Row::end_row(): index out of bounds" ); return Mat::memptr() + Mat::n_cols; } @@ -1544,7 +1544,7 @@ arma_warn_unused eT& Row::fixed::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::mem_local[ii]; } @@ -1558,7 +1558,7 @@ arma_warn_unused const eT& Row::fixed::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::mem_local[ii]; } diff --git a/include/armadillo_bits/SpCol_meat.hpp b/include/armadillo_bits/SpCol_meat.hpp index 9f09cd92..6ba570bc 100644 --- a/include/armadillo_bits/SpCol_meat.hpp +++ b/include/armadillo_bits/SpCol_meat.hpp @@ -238,7 +238,7 @@ SpCol::shed_row(const uword row_num) { arma_extra_debug_sigprint(); - arma_debug_check( row_num >= SpMat::n_rows, "SpCol::shed_row(): out of bounds"); + arma_debug_check( row_num >= SpMat::n_rows, "SpCol::shed_row(): out of bounds" ); shed_rows(row_num, row_num); } @@ -364,7 +364,7 @@ SpCol::begin_row(const uword row_num) { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::begin_row(): index out of bounds"); + arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::begin_row(): index out of bounds" ); SpMat::sync_csc(); @@ -380,7 +380,7 @@ SpCol::begin_row(const uword row_num) const { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::begin_row(): index out of bounds"); + arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::begin_row(): index out of bounds" ); SpMat::sync_csc(); @@ -396,7 +396,7 @@ SpCol::end_row(const uword row_num) { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::end_row(): index out of bounds"); + arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::end_row(): index out of bounds" ); SpMat::sync_csc(); @@ -412,7 +412,7 @@ SpCol::end_row(const uword row_num) const { arma_extra_debug_sigprint(); - arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::end_row(): index out of bounds"); + arma_debug_check( (row_num >= SpMat::n_rows), "SpCol::end_row(): index out of bounds" ); SpMat::sync_csc(); diff --git a/include/armadillo_bits/SpMat_meat.hpp b/include/armadillo_bits/SpMat_meat.hpp index 6cda873f..d31df73b 100644 --- a/include/armadillo_bits/SpMat_meat.hpp +++ b/include/armadillo_bits/SpMat_meat.hpp @@ -2721,7 +2721,7 @@ SpMat::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(*this, 0, 0, N, n_cols); } @@ -2735,7 +2735,7 @@ SpMat::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(*this, 0, 0, N, n_cols); } @@ -2749,7 +2749,7 @@ SpMat::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::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::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(*this, 0, 0, n_rows, N); } @@ -2795,7 +2795,7 @@ SpMat::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(*this, 0, 0, n_rows, N); } @@ -2809,7 +2809,7 @@ SpMat::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::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 SpMat::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::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 SpMat::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((*this), cache, in_row, in_col); } @@ -3368,7 +3368,7 @@ arma_warn_unused eT SpMat::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); } diff --git a/include/armadillo_bits/SpRow_meat.hpp b/include/armadillo_bits/SpRow_meat.hpp index f713d03a..c673372c 100644 --- a/include/armadillo_bits/SpRow_meat.hpp +++ b/include/armadillo_bits/SpRow_meat.hpp @@ -238,7 +238,7 @@ SpRow::shed_col(const uword col_num) { arma_extra_debug_sigprint(); - arma_debug_check( col_num >= SpMat::n_cols, "SpRow::shed_col(): out of bounds"); + arma_debug_check( col_num >= SpMat::n_cols, "SpRow::shed_col(): out of bounds" ); shed_cols(col_num, col_num); } @@ -336,9 +336,9 @@ SpRow::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::n_cols), "SpRow::insert_cols(): out of bounds"); +// arma_debug_check( (col_num > SpMat::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::col_ptrs[col_num]; // SpMat::col_ptrs.insert(col_num, N, newVal); diff --git a/include/armadillo_bits/SpSubview_meat.hpp b/include/armadillo_bits/SpSubview_meat.hpp index e05b7239..d1a49197 100644 --- a/include/armadillo_bits/SpSubview_meat.hpp +++ b/include/armadillo_bits/SpSubview_meat.hpp @@ -912,7 +912,7 @@ inline SpSubview_MapMat_val SpSubview::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::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 SpSubview::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::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); } diff --git a/include/armadillo_bits/diagview_meat.hpp b/include/armadillo_bits/diagview_meat.hpp index 2063f7ea..689c3ae3 100644 --- a/include/armadillo_bits/diagview_meat.hpp +++ b/include/armadillo_bits/diagview_meat.hpp @@ -86,7 +86,7 @@ diagview::operator= (const diagview& x) diagview& 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& d_m = const_cast< Mat& >(d.m); const Mat& x_m = x.m; diff --git a/include/armadillo_bits/fn_lu.hpp b/include/armadillo_bits/fn_lu.hpp index 41256e80..e2cfed9e 100644 --- a/include/armadillo_bits/fn_lu.hpp +++ b/include/armadillo_bits/fn_lu.hpp @@ -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); diff --git a/include/armadillo_bits/fn_qr.hpp b/include/armadillo_bits/fn_qr.hpp index 9ea5c60c..fa5b461d 100644 --- a/include/armadillo_bits/fn_qr.hpp +++ b/include/armadillo_bits/fn_qr.hpp @@ -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); diff --git a/include/armadillo_bits/fn_randperm.hpp b/include/armadillo_bits/fn_randperm.hpp index a0bacdee..08b7d57c 100644 --- a/include/armadillo_bits/fn_randperm.hpp +++ b/include/armadillo_bits/fn_randperm.hpp @@ -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; diff --git a/include/armadillo_bits/fn_sort.hpp b/include/armadillo_bits/fn_sort.hpp index c209e86f..67558edb 100644 --- a/include/armadillo_bits/fn_sort.hpp +++ b/include/armadillo_bits/fn_sort.hpp @@ -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; diff --git a/include/armadillo_bits/op_index_max_meat.hpp b/include/armadillo_bits/op_index_max_meat.hpp index 4baa1308..82b1dc3e 100644 --- a/include/armadillo_bits/op_index_max_meat.hpp +++ b/include/armadillo_bits/op_index_max_meat.hpp @@ -29,7 +29,7 @@ op_index_max::apply(Mat& out, const mtOp& 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 U(in.m); const Mat& X = U.M; diff --git a/include/armadillo_bits/op_index_min_meat.hpp b/include/armadillo_bits/op_index_min_meat.hpp index 59e036d8..61f8cd7a 100644 --- a/include/armadillo_bits/op_index_min_meat.hpp +++ b/include/armadillo_bits/op_index_min_meat.hpp @@ -29,7 +29,7 @@ op_index_min::apply(Mat& out, const mtOp& 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 U(in.m); const Mat& X = U.M; diff --git a/include/armadillo_bits/op_max_meat.hpp b/include/armadillo_bits/op_max_meat.hpp index c1b49971..dc42f7cf 100644 --- a/include/armadillo_bits/op_max_meat.hpp +++ b/include/armadillo_bits/op_max_meat.hpp @@ -29,7 +29,7 @@ op_max::apply(Mat& out, const Op& 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 U(in.m); const Mat& X = U.M; diff --git a/include/armadillo_bits/op_min_meat.hpp b/include/armadillo_bits/op_min_meat.hpp index 844425c9..3862e992 100644 --- a/include/armadillo_bits/op_min_meat.hpp +++ b/include/armadillo_bits/op_min_meat.hpp @@ -29,7 +29,7 @@ op_min::apply(Mat& out, const Op& 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 U(in.m); const Mat& X = U.M; diff --git a/include/armadillo_bits/op_range_meat.hpp b/include/armadillo_bits/op_range_meat.hpp index 8f7e4514..3ac9e9a4 100644 --- a/include/armadillo_bits/op_range_meat.hpp +++ b/include/armadillo_bits/op_range_meat.hpp @@ -29,7 +29,7 @@ op_range::apply(Mat& out, const Op& 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 U(in.m); const Mat& X = U.M; diff --git a/include/armadillo_bits/podarray_meat.hpp b/include/armadillo_bits/podarray_meat.hpp index 9a0b66ff..fd0d21a4 100644 --- a/include/armadillo_bits/podarray_meat.hpp +++ b/include/armadillo_bits/podarray_meat.hpp @@ -193,7 +193,7 @@ arma_inline eT podarray::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::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]); } diff --git a/include/armadillo_bits/running_stat_vec_meat.hpp b/include/armadillo_bits/running_stat_vec_meat.hpp index 8b2045c8..064329fd 100644 --- a/include/armadillo_bits/running_stat_vec_meat.hpp +++ b/include/armadillo_bits/running_stat_vec_meat.hpp @@ -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); diff --git a/include/armadillo_bits/subview_meat.hpp b/include/armadillo_bits/subview_meat.hpp index 5238e248..b8819293 100644 --- a/include/armadillo_bits/subview_meat.hpp +++ b/include/armadillo_bits/subview_meat.hpp @@ -1217,7 +1217,7 @@ inline eT& subview::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::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::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::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::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::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::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(colptr(col_num), n_rows, false, true); } @@ -1995,7 +1995,7 @@ subview::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(const_cast(colptr(col_num)), n_rows, false, true); } @@ -3439,7 +3439,7 @@ inline eT& subview_col::operator()(const uword ii) { - arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds"); + arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds" ); return access::rw( colmem[ii] ); } @@ -3451,7 +3451,7 @@ inline eT subview_col::operator()(const uword ii) const { - arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds"); + arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds" ); return colmem[ii]; } @@ -3463,7 +3463,7 @@ inline eT& subview_col::operator()(const uword in_row, const uword in_col) { - arma_debug_check( ((in_row >= subview::n_rows) || (in_col > 0)), "subview::operator(): index out of bounds"); + arma_debug_check( ((in_row >= subview::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::operator()(const uword in_row, const uword in_col) const { - arma_debug_check( ((in_row >= subview::n_rows) || (in_col > 0)), "subview::operator(): index out of bounds"); + arma_debug_check( ((in_row >= subview::n_rows) || (in_col > 0)), "subview::operator(): index out of bounds" ); return colmem[in_row]; } @@ -3527,7 +3527,7 @@ subview_col::rows(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::n_rows) ), "subview_col::rows(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::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::rows(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::n_rows) ), "subview_col::rows(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::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::subvec(const uword in_row1, const uword in_row2) { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::n_rows) ), "subview_col::subvec(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::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::subvec(const uword in_row1, const uword in_row2) const { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::n_rows) ), "subview_col::subvec(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_row1 > in_row2) || (in_row2 >= subview::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::head(const uword N) { arma_extra_debug_sigprint(); - arma_debug_check( (N > subview::n_rows), "subview_col::head(): size out of bounds"); + arma_debug_check( (N > subview::n_rows), "subview_col::head(): size out of bounds" ); return subview_col(this->m, this->aux_col1, this->aux_row1, N); } @@ -3649,7 +3649,7 @@ subview_col::head(const uword N) const { arma_extra_debug_sigprint(); - arma_debug_check( (N > subview::n_rows), "subview_col::head(): size out of bounds"); + arma_debug_check( (N > subview::n_rows), "subview_col::head(): size out of bounds" ); return subview_col(this->m, this->aux_col1, this->aux_row1, N); } @@ -3663,7 +3663,7 @@ subview_col::tail(const uword N) { arma_extra_debug_sigprint(); - arma_debug_check( (N > subview::n_rows), "subview_col::tail(): size out of bounds"); + arma_debug_check( (N > subview::n_rows), "subview_col::tail(): size out of bounds" ); const uword start_row = subview::aux_row1 + subview::n_rows - N; @@ -3679,7 +3679,7 @@ subview_col::tail(const uword N) const { arma_extra_debug_sigprint(); - arma_debug_check( (N > subview::n_rows), "subview_col::tail(): size out of bounds"); + arma_debug_check( (N > subview::n_rows), "subview_col::tail(): size out of bounds" ); const uword start_row = subview::aux_row1 + subview::n_rows - N; @@ -4035,7 +4035,7 @@ inline eT& subview_row::operator()(const uword ii) { - arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds"); + arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds" ); const uword index = (ii + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); @@ -4049,7 +4049,7 @@ inline eT subview_row::operator()(const uword ii) const { - arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds"); + arma_debug_check( (ii >= subview::n_elem), "subview::operator(): index out of bounds" ); const uword index = (ii + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); @@ -4063,7 +4063,7 @@ inline eT& subview_row::operator()(const uword in_row, const uword in_col) { - arma_debug_check( ((in_row > 0) || (in_col >= subview::n_cols)), "subview::operator(): index out of bounds"); + arma_debug_check( ((in_row > 0) || (in_col >= subview::n_cols)), "subview::operator(): index out of bounds" ); const uword index = (in_col + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); @@ -4077,7 +4077,7 @@ inline eT subview_row::operator()(const uword in_row, const uword in_col) const { - arma_debug_check( ((in_row > 0) || (in_col >= subview::n_cols)), "subview::operator(): index out of bounds"); + arma_debug_check( ((in_row > 0) || (in_col >= subview::n_cols)), "subview::operator(): index out of bounds" ); const uword index = (in_col + (subview::aux_col1))*(subview::m).n_rows + (subview::aux_row1); @@ -4135,7 +4135,7 @@ subview_row::cols(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview::n_cols) ), "subview_row::cols(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview::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::subvec(const uword in_col1, const uword in_col2) { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview::n_cols) ), "subview_row::subvec(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview::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::subvec(const uword in_col1, const uword in_col2) const { arma_extra_debug_sigprint(); - arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview::n_cols) ), "subview_row::subvec(): indices out of bounds or incorrectly used"); + arma_debug_check( ( (in_col1 > in_col2) || (in_col2 >= subview::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::head(const uword N) { arma_extra_debug_sigprint(); - arma_debug_check( (N > subview::n_cols), "subview_row::head(): size out of bounds"); + arma_debug_check( (N > subview::n_cols), "subview_row::head(): size out of bounds" ); return subview_row(this->m, this->aux_row1, this->aux_col1, N); } @@ -4239,7 +4239,7 @@ subview_row::head(const uword N) const { arma_extra_debug_sigprint(); - arma_debug_check( (N > subview::n_cols), "subview_row::head(): size out of bounds"); + arma_debug_check( (N > subview::n_cols), "subview_row::head(): size out of bounds" ); return subview_row(this->m, this->aux_row1, this->aux_col1, N); } @@ -4253,7 +4253,7 @@ subview_row::tail(const uword N) { arma_extra_debug_sigprint(); - arma_debug_check( (N > subview::n_cols), "subview_row::tail(): size out of bounds"); + arma_debug_check( (N > subview::n_cols), "subview_row::tail(): size out of bounds" ); const uword start_col = subview::aux_col1 + subview::n_cols - N; @@ -4269,7 +4269,7 @@ subview_row::tail(const uword N) const { arma_extra_debug_sigprint(); - arma_debug_check( (N > subview::n_cols), "subview_row::tail(): size out of bounds"); + arma_debug_check( (N > subview::n_cols), "subview_row::tail(): size out of bounds" ); const uword start_col = subview::aux_col1 + subview::n_cols - N;