/**
* @param infinities the number of infinities to fill.
* @param buffer the buffer into which the infinities shall be filled.
*/
protected void addInfinities(int missingInfinities, DoubleBuffer buffer) {
RandomSamplingAssistant oldAssistant = this.samplingAssistant;
this.samplingAssistant = null; // switch off sampler
//double[] infinities = new double[missingInfinities];
boolean even=true;
for (int i=0; i<missingInfinities; i++) {