private static void s_ucumm(SparseBlock a,double[] agg,double[] c,int m,int n,int rl,int ru){
  double[] cprod=(agg != null) ? agg : new double[n];
  if (agg == null)   Arrays.fill(cprod,1);
  int[] cnt=new int[n];
  for (int i=rl, ix=rl * n; i < ru; i++, ix+=n) {
    if (!a.isEmpty(i)) {
      int apos=a.pos(i);
      int alen=a.size(i);
      int[] aix=a.indexes(i);
      double[] avals=a.values(i);
      productAgg(avals,cprod,aix,apos,0,alen);
      countAgg(avals,cnt,aix,apos,alen);
    }
    for (int j=0; j < n; j++)     if (cnt[j] < i + 1)     cprod[j]*=0;
    System.arraycopy(cprod,0,c,ix,n);
  }
}

private static void s_ucumm ( SparseBlock a , double [ ] agg , double [ ] c , int m , int n , int rl , int ru ) { double [ ] cprod = ( agg != null ) ? agg : new double [ n ] ; if ( agg == null ) Arrays . fill ( cprod , 1 ) ; int [ ] cnt = new int [ n ] ; for ( int i = rl , ix = rl * n ; i < ru ; i ++ , ix += n ) { if ( ! a . isEmpty ( i ) ) { int apos = a . pos ( i ) ; int alen = a . size ( i ) ; int [ ] aix = a . indexes ( i ) ; double [ ] avals = a . values ( i ) ; productAgg ( avals , cprod , aix , apos , 0 , alen ) ; countAgg ( avals , cnt , aix , apos , alen ) ; } for ( int j = 0 ; j < n ; j ++ ) if ( cnt [ j ] < i + 1 ) cprod [ j ] *= 0 ; System . arraycopy ( cprod , 0 , c , ix , n ) ; } }
cumprod , opcode : ucum * , sparse input .
