From b7cf2fd503c6c9202b2c4e7d088f5b51e98dc310 Mon Sep 17 00:00:00 2001 From: conrad Date: Sat, 23 Nov 2024 13:49:04 +1000 Subject: [PATCH] remove functions from Mat that are present in Base --- include/armadillo_bits/Mat_bones.hpp | 9 --- include/armadillo_bits/Mat_meat.hpp | 100 --------------------------- 2 files changed, 109 deletions(-) diff --git a/include/armadillo_bits/Mat_bones.hpp b/include/armadillo_bits/Mat_bones.hpp index 7ee55447..fe5356f5 100644 --- a/include/armadillo_bits/Mat_bones.hpp +++ b/include/armadillo_bits/Mat_bones.hpp @@ -533,21 +533,12 @@ class Mat : public Base< eT, Mat > arma_cold inline void reset(); arma_cold inline void soft_reset(); - template inline void set_real(const Base& X); template inline void set_imag(const Base& X); - arma_warn_unused inline eT min() const; arma_warn_unused inline eT max() const; - arma_frown("use .index_min() instead") inline eT min(uword& index_of_min_val) const; - arma_frown("use .index_max() instead") inline eT max(uword& index_of_max_val) const; - - arma_frown("use .index_min() with ind2sub() instead") inline eT min(uword& row_of_min_val, uword& col_of_min_val) const; - arma_frown("use .index_max() with ind2sub() instead") inline eT max(uword& row_of_max_val, uword& col_of_max_val) const; - - arma_cold inline bool save(const std::string name, const file_type type = arma_binary) const; arma_cold inline bool save(const hdf5_name& spec, const file_type type = hdf5_binary) const; arma_cold inline bool save(const csv_name& spec, const file_type type = csv_ascii) const; diff --git a/include/armadillo_bits/Mat_meat.hpp b/include/armadillo_bits/Mat_meat.hpp index 51524abd..365677ca 100644 --- a/include/armadillo_bits/Mat_meat.hpp +++ b/include/armadillo_bits/Mat_meat.hpp @@ -7759,106 +7759,6 @@ Mat::max() const -template -inline -eT -Mat::min(uword& index_of_min_val) const - { - arma_debug_sigprint(); - - if(n_elem == 0) - { - arma_conform_check(true, "Mat::min(): object has no elements"); - - index_of_min_val = uword(0); - - return Datum::nan; - } - - return op_min::direct_min(memptr(), n_elem, index_of_min_val); - } - - - -template -inline -eT -Mat::max(uword& index_of_max_val) const - { - arma_debug_sigprint(); - - if(n_elem == 0) - { - arma_conform_check(true, "Mat::max(): object has no elements"); - - index_of_max_val = uword(0); - - return Datum::nan; - } - - return op_max::direct_max(memptr(), n_elem, index_of_max_val); - } - - - -template -inline -eT -Mat::min(uword& row_of_min_val, uword& col_of_min_val) const - { - arma_debug_sigprint(); - - if(n_elem == 0) - { - arma_conform_check(true, "Mat::min(): object has no elements"); - - row_of_min_val = uword(0); - col_of_min_val = uword(0); - - return Datum::nan; - } - - uword iq; - - eT val = op_min::direct_min(memptr(), n_elem, iq); - - row_of_min_val = iq % n_rows; - col_of_min_val = iq / n_rows; - - return val; - } - - - -template -inline -eT -Mat::max(uword& row_of_max_val, uword& col_of_max_val) const - { - arma_debug_sigprint(); - - if(n_elem == 0) - { - arma_conform_check(true, "Mat::max(): object has no elements"); - - row_of_max_val = uword(0); - col_of_max_val = uword(0); - - return Datum::nan; - } - - uword iq; - - eT val = op_max::direct_max(memptr(), n_elem, iq); - - row_of_max_val = iq % n_rows; - col_of_max_val = iq / n_rows; - - return val; - } - - - //! save the matrix to a file template inline