private FPTree buildFPTree(final Relation<BitVector> relation,int[] iidx,final int items){
  FPTree tree=new FPTree(items);
  FiniteProgress prog=LOG.isVerbose() ? new FiniteProgress("Building FP-tree",relation.size(),LOG) : null;
  int[] buf=new int[items];
  for (DBIDIter iditer=relation.iterDBIDs(); iditer.valid(); iditer.advance()) {
    int l=0;
    SparseFeatureVector<?> bv=relation.get(iditer);
    for (int it=bv.iter(); bv.iterValid(it); it=bv.iterAdvance(it)) {
      int i=iidx[bv.iterDim(it)];
      if (i < 0) {
        continue;
      }
      buf[l++]=i;
    }
    if (l >= minlength) {
      Arrays.sort(buf,0,l);
      tree.insert(buf,0,l,1);
    }
    LOG.incrementProcessed(prog);
  }
  LOG.ensureCompleted(prog);
  return tree;
}

private FPTree buildFPTree ( final Relation < BitVector > relation , int [ ] iidx , final int items ) { FPTree tree = new FPTree ( items ) ; FiniteProgress prog = LOG . isVerbose ( ) ? new FiniteProgress ( "Building FP-tree" , relation . size ( ) , LOG ) : null ; int [ ] buf = new int [ items ] ; for ( DBIDIter iditer = relation . iterDBIDs ( ) ; iditer . valid ( ) ; iditer . advance ( ) ) { int l = 0 ; SparseFeatureVector < ? > bv = relation . get ( iditer ) ; for ( int it = bv . iter ( ) ; bv . iterValid ( it ) ; it = bv . iterAdvance ( it ) ) { int i = iidx [ bv . iterDim ( it ) ] ; if ( i < 0 ) { continue ; } buf [ l ++ ] = i ; } if ( l >= minlength ) { Arrays . sort ( buf , 0 , l ) ; tree . insert ( buf , 0 , l , 1 ) ; } LOG . incrementProcessed ( prog ) ; } LOG . ensureCompleted ( prog ) ; return tree ; }
build the actual fp - tree structure .
