simplification

This commit is contained in:
conrad
2020-12-21 13:21:39 +10:00
parent c95b5854d2
commit deb48cfa48
2 changed files with 8 additions and 11 deletions
@@ -69,7 +69,7 @@ class arma_ostream
arma_cold inline static void print(std::ostream& o, const SizeCube& S);
template<typename eT> arma_cold inline static void brief_print(std::ostream& o, const Mat<eT>& m, const bool print_size = true);
template<typename eT> arma_cold inline static void brief_print(std::ostream& o, const Cube<eT>& m, const bool print_size = true);
template<typename eT> arma_cold inline static void brief_print(std::ostream& o, const Cube<eT>& m);
template<typename eT> arma_cold inline static void brief_print(std::ostream& o, const SpMat<eT>& m);
};
+7 -10
View File
@@ -1067,21 +1067,18 @@ template<typename eT>
arma_cold
inline
void
arma_ostream::brief_print(std::ostream& o, const Cube<eT>& x, const bool print_size)
arma_ostream::brief_print(std::ostream& o, const Cube<eT>& x)
{
arma_extra_debug_sigprint();
const arma_ostream_state stream_state(o);
if(print_size)
{
o.unsetf(ios::showbase);
o.unsetf(ios::uppercase);
o.unsetf(ios::showpos);
o.setf(ios::fixed);
o << "[cube size: " << x.n_rows << 'x' << x.n_cols << 'x' << x.n_slices << "]\n";
}
o.unsetf(ios::showbase);
o.unsetf(ios::uppercase);
o.unsetf(ios::showpos);
o.setf(ios::fixed);
o << "[cube size: " << x.n_rows << 'x' << x.n_cols << 'x' << x.n_slices << "]\n";
if(x.n_elem == 0) { o.flush(); stream_state.restore(o); return; }