int days_spanned = getDaysSpanned(bucket, start, end); if ((days_spanned > 0) && !(days_spanned > bucketSize)) { Rate rate = taskUtils.getRate(task); Duration d = durationArray[days_spanned]; Scalar scalar = (Scalar)rate.computeNumerator(d); return taskUtils.getDouble(scalar);
int days_spanned = getDaysSpanned(bucket, start, end); if ((days_spanned > 0) && !(days_spanned > bucketSize)) { Rate rate = taskUtils.getRate(task); Duration d = durationArray[days_spanned]; Scalar scalar = (Scalar) rate.computeNumerator(d); return taskUtils.getDouble(scalar); } return 0.0;
  public double getProjectionTaskDemand(Task task, int bucket, long start, long end) {    // If days_spanned is less than zero or days_spanned is greater than the bucket size    // then the task has no demand for this bucket    int days_spanned = getDaysSpanned(bucket, start, end);    if ((days_spanned > 0) && !(days_spanned > bucketSize)) {      Rate rate = taskUtils.getRate(task);      Duration d = durationArray[days_spanned];      Scalar scalar = (Scalar)rate.computeNumerator(d);      return taskUtils.getDouble(scalar);    }    return 0.0;  }