@Override public CategoricalResults clone(){
  CategoricalResults copy=new CategoricalResults(n);
  copy.probabilities=Arrays.copyOf(probabilities,probabilities.length);
  return copy;
}

@ Override public CategoricalResults clone ( ) { CategoricalResults copy = new CategoricalResults ( n ) ; copy . probabilities = Arrays . copyOf ( probabilities , probabilities . length ) ; return copy ; }
creates a deep clone of this
