Monday, 24 August 2015

Mahout: FastIDSet


It is just like Set in Java, but implementation is optimized in specific to Mahout recommenders.

import org.apache.mahout.cf.taste.impl.common.FastIDSet;

public class FastIdSetEx {
 public static void main(String args[]) {
  FastIDSet set = new FastIDSet();

  set.add(100l);
  set.add(123l);

  System.out.println(set);
 }
}

Output
[100,123]



Prevoius                                                 Next                                                 Home

No comments:

Post a Comment