code: private static RandomVariable[] numberListToDoubleArray(List<RandomVariable> listOfNumbers) {
  		RandomVariable[] array	= new RandomVariable[listOfNumbers.size()];
  		for(int i=0; i<array.length; i++) {
  			array[i] = listOfNumbers.get(i);
  		}
  		return array;
  	}
docs: Convert a list of numbers to an array of doubles.
  
  @param listOfNumbers A list of numbers.
  @return A corresponding array of doubles executing <code>doubleValue()</code> on each element.