Пример #1
0
  public double getExpectedValueForEntity_AtTime(T ent, double t) {

    TimeValue val = this.get(ent);
    if (val == null) return defaultValue.getExpectedValueForTime(t);

    return val.getExpectedValueForTime(t);
  }
Пример #2
0
  public double getFirstNonZeroExpectedValueForTime(double t) {

    // find the first non zero entry
    for (TimeValue each : this.values()) {
      if (each.getExpectedValueForTime(t) > 0) {
        return each.getExpectedValueForTime(t);
      }
    }

    return defaultValue.getExpectedValueForTime(t);
  }
Пример #3
0
  public boolean hasNonZeroExpectedValueForTime(double t) {

    // find the first non zero entry
    for (TimeValue each : this.values()) {
      if (each.getExpectedValueForTime(t) > 0) {
        return true;
      }
    }

    if (defaultValue.getExpectedValueForTime(t) > 0) return true;

    return false;
  }