Store sum of rowsums , max of row sum number of non zero row sums
for ( var i = 0 ; i < r ; i ++ ) { row_sum += row [ i ] ; row_max = Math . max ( row_max , row [ i ] ) ; if ( row [ i ] ) row_non_zero ++ ; }