public double getExpectedValueForTime(double time) { if (!Double.isNaN(dVal)) return currentValue; if (monthVal != null) return currentValue; if (probVal != null) return probVal.getExpectedValue(); return monthProbVal.get(Clock.getMonthIndex(time)).getExpectedValue(); }
public void initialize() { if (probVal != null) { probVal.initialize(); } if (monthProbVal != null) { for (ProbabilityDistribution each : monthProbVal) { each.initialize(); } } // Initialize the current value if (!Double.isNaN(dVal)) currentValue = dVal; if (monthVal != null) currentValue = monthVal.get(Clock.getMonthIndex(0)); if (probVal != null) currentValue = probVal.getExpectedValue(); }