diff --git a/include/armadillo_bits/op_mean_meat.hpp b/include/armadillo_bits/op_mean_meat.hpp index 3fa57025..0d1aa040 100644 --- a/include/armadillo_bits/op_mean_meat.hpp +++ b/include/armadillo_bits/op_mean_meat.hpp @@ -398,6 +398,10 @@ op_mean::direct_mean(const eT* const X, const uword n_elem) +// TODO: corner-case bug: doesn't work properly if X has inf; problem is inf - inf = nan +// TODO: refactor to have old mean as an arg, which is then returned if X has inf +// TODO: remove other forms of direct_mean_robust() +// TODO: refactor callers to create an array that is used as arg to this function template inline eT @@ -413,6 +417,7 @@ op_mean::direct_mean_robust(const eT* const X, const uword n_elem) eT r_mean = eT(0); + // TODO: refactor into simple loop; the division takes many cycles anyway for(i=0, j=1; j& X, const uword row) +// TODO: corner-case bug: doesn't work properly if X has inf; problem is inf - inf = nan template inline eT @@ -548,6 +554,7 @@ op_mean::mean_all(const subview& X) +// TODO: corner-case bug: doesn't work properly if X has inf; problem is inf - inf = nan template inline eT @@ -628,6 +635,7 @@ op_mean::mean_all(const diagview& X) +// TODO: corner-case bug: doesn't work properly if X has inf; problem is inf - inf = nan template inline eT