for (int i = 0; i < relHeights.size(); i++) {
final double d = relHeights.get(i);
final double relHeight = d;// -.99 + (j * .05);
final double freq = 1d / 3600d;
final double min = 0;// j * .10d;
final SineIntensity intensity = new SineIntensity(
1d, freq, relHeight, min);
final UnivariateIntegrator ri = new RombergIntegrator(16, 32);// new
// TrapezoidIntegrator();//
// new
// SimpsonIntegrator();//
// new
// RombergIntegrator();
final double val = ri.integrate(10000000, new IntensityFunctionWrapper(
intensity), 0, lengthOfScenario);
System.out
.printf("%1d relative height: %1.3f%n", i, relHeight);
final double newAmpl = orders / val;
final SineIntensity finalIntensity = new SineIntensity(
newAmpl, freq, relHeight, newAmpl * min);
final double compensatedArea = ri.integrate(10000000,
new IntensityFunctionWrapper(
finalIntensity), 0, lengthOfScenario);
// System.out.printf("compensated area: %1.3f%n", compensatedArea);