code: private RandomVariable[] getBasisFunctions(RandomVariable underlying) {
  		double min = underlying.getMin();
  		double max = underlying.getMax();
  
  		ArrayList<RandomVariable> basisFunctionList = new ArrayList<>();
  		double[] discretization = (new TimeDiscretizationFromArray(min, numberOfBins, (max-min)/numberOfBins)).getAsDoubleArray();
  		for(double discretizationStep : discretization) {
  			RandomVariable indicator = underlying.sub(discretizationStep).choose(new RandomVariableFromDoubleArray(1.0), new RandomVariableFromDoubleArray(0.0));
  			basisFunctionList.add(indicator);
  		}
  
  		return basisFunctionList.toArray(new RandomVariable[0]);
  	}
docs: Create basis functions for a binning.
  
  @param underlying
  @return