/** Not yet commented. */
  public static void test(int weight, int size) {
    WeightedRandomSampler sampler = new WeightedRandomSampler();
    sampler.setWeight(weight);

    org.ihtsdo.cern.colt.list.IntArrayList sample = new org.ihtsdo.cern.colt.list.IntArrayList();
    for (int i = 0; i < size; i++) {
      if (sampler.sampleNextElement()) sample.add(i);
    }

    System.out.println("Sample = " + sample);
  }
 /** Returns a deep copy of the receiver. */
 public Object clone() {
   WeightedRandomSampler copy = (WeightedRandomSampler) super.clone();
   copy.generator = (Uniform) this.generator.clone();
   return copy;
 }