code: private double getMRTime(double time, double maturity) {
  		int timeIndexStart = volatilityModel.getTimeDiscretization().getTimeIndex(time);
  		if(timeIndexStart < 0) {
  			timeIndexStart = -timeIndexStart-1;	// Get timeIndex corresponding to next point
  		}
  
  		int timeIndexEnd =volatilityModel.getTimeDiscretization().getTimeIndex(maturity);
  		if(timeIndexEnd < 0) {
  			timeIndexEnd = -timeIndexEnd-2;	// Get timeIndex corresponding to previous point
  		}
  
  		double integral = 0.0;
  		double timePrev = time;
  		double timeNext;
  		for(int timeIndex=timeIndexStart+1; timeIndex<=timeIndexEnd; timeIndex++) {
  			timeNext = volatilityModel.getTimeDiscretization().getTime(timeIndex);
  			double meanReversion = volatilityModel.getMeanReversion(timeIndex-1);
  			integral += meanReversion*(timeNext-timePrev);
  			timePrev = timeNext;
  		}
  		timeNext = maturity;
  		double meanReversion = volatilityModel.getMeanReversion(timeIndexEnd);
  		integral += meanReversion*(timeNext-timePrev);
  
  		return integral;
  	}
docs: Calculates \( \int_{t}^{T} a(s) \mathrm{d}s \), where \( a \) is the mean reversion parameter.
  
  @param time The parameter t.
  @param maturity The parameter T.
  @return The value of \( \int_{t}^{T} a(s) \mathrm{d}s \).