float[] probs = new float[numEntries];
for(PairOfIntFloat pair : indexProbPairs){
indices[i] = pair.getLeftElement();
probs[i++] = pair.getRightElement()/sumOfProbs;
}
table.set(gerIndex, new IndexedFloatArray(indices, probs, true));
}
}
// dispose all the resources after using them.
fis.close();