Yes, will fix.

On Aug 9, 2009, at 2:40 PM, Ted Dunning wrote:

Shouldn't this iterate over non-zeros instead of over all elements?

On Sun, Aug 9, 2009 at 4:08 AM, <[email protected]> wrote:

     // this is the number of non-zero elements
     double val = 0.0;
     for (int i = 0; i < size(); i++) {
       val += getQuick(i) == 0 ? 0 : 1;
     }
-      return divide(val);
+      return val;




Reply via email to