update comments

This commit is contained in:
conrad
2021-01-03 15:14:40 +10:00
parent 8879cde0fd
commit ba147a25de
4 changed files with 9 additions and 10 deletions
+2 -2
View File
@@ -2669,12 +2669,12 @@ Mat<eT>::operator/=(const SpBase<eT, T1>& m)
{
arma_extra_debug_sigprint();
// NOTE: use of this function is not advised; it is implemented only for completeness
const SpProxy<T1> p(m.get_ref());
arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "element-wise division");
// If you use this method, you are probably stupid or misguided, but for completeness it is implemented.
// Unfortunately the best way to do this is loop over every element.
for(uword c = 0; c < n_cols; ++c)
for(uword r = 0; r < n_rows; ++r)
{
+4 -6
View File
@@ -778,16 +778,14 @@ SpMat<eT>::operator/=(const SpMat<eT>& x)
{
arma_extra_debug_sigprint();
// NOTE: use of this function is not advised; it is implemented only for completeness
arma_debug_assert_same_size(n_rows, n_cols, x.n_rows, x.n_cols, "element-wise division");
// If you use this method, you are probably stupid or misguided,
// but for compatibility with Mat, we have implemented it anyway.
for(uword c = 0; c < n_cols; ++c)
for(uword r = 0; r < n_rows; ++r)
{
for(uword r = 0; r < n_rows; ++r)
{
at(r, c) /= x.at(r, c);
}
at(r, c) /= x.at(r, c);
}
return *this;
+2 -1
View File
@@ -476,7 +476,6 @@ SpSubview<eT>::operator%=(const SpBase<eT, T1>& x)
//! If you are using this function, you are probably misguided.
template<typename eT>
template<typename T1>
inline
@@ -485,6 +484,8 @@ SpSubview<eT>::operator/=(const SpBase<eT, T1>& x)
{
arma_extra_debug_sigprint();
// NOTE: use of this function is not advised; it is implemented only for completeness
SpProxy<T1> p(x.get_ref());
arma_debug_assert_same_size(n_rows, n_cols, p.get_n_rows(), p.get_n_cols(), "element-wise division");
+1 -1
View File
@@ -1570,7 +1570,7 @@ sp_auxlib::spsolve_refine(Mat<typename T1::elem_type>& X, typename T1::pod_type&
// We have to actually create the object which stores the data.
// This gets cleaned by destroy_supermatrix().
// We have to use SuperLU's stupid memory allocation routines since they are
// We have to use SuperLU's problematic memory allocation routines since they are
// not guaranteed to be new and delete. See the comments in def_superlu.hpp
superlu::NCformat* nc = (superlu::NCformat*)superlu::malloc(sizeof(superlu::NCformat));