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

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

    return val.getMaxValueFor(t);
  }
Пример #2
0
  public double getCurrentValueForEntity(T ent) {

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

    return val.getCurrentValue();
  }
Пример #3
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);
  }
Пример #4
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;
  }
Пример #5
0
 public void initialize() {
   for (TimeValue each : this.values()) {
     each.initialize();
   }
   defaultValue.initialize();
 }