/**
   * Create the ECDF attribute
   *
   * @param xAxisTransformation the transformation to be applied to the {@code x}-axis
   * @param yAxisInputTransformation the transformation to be applied to the data of the {@code y}
   *     -axis before being fed to the actual computation
   * @param yAxisOutputTransformation the transformation of the result of the function applied to
   *     the data on the {@code y}-axis.
   * @param goalValue the goal value
   * @param criterion the goal comparison criterion
   * @param aggregate the method to aggregate the ECDFs
   */
  public ECDF(
      final DimensionTransformation xAxisTransformation,
      final DimensionTransformation yAxisInputTransformation,
      final Transformation yAxisOutputTransformation,
      final Number goalValue,
      final EComparison criterion,
      final StatisticalParameter aggregate) {
    super(
        EAttributeType.NEVER_STORED,
        xAxisTransformation,
        yAxisInputTransformation,
        yAxisOutputTransformation);

    final IDimension goalDim;

    if (goalValue == null) {
      throw new IllegalArgumentException( //
          "Goal value of ECDF cannot be null."); //$NON-NLS-1$
    }
    if (criterion == null) {
      throw new IllegalArgumentException( //
          "Comparison criterion of ECDF cannot be null."); //$NON-NLS-1$
    }
    if (aggregate == null) {
      throw new IllegalArgumentException( //
          "Aggregate to join ECDFs of different instance sets cannot be null."); //$NON-NLS-1$
    }

    goalDim = yAxisInputTransformation.getDimension();

    switch (goalDim.getDataType()) {
      case BYTE:
      case SHORT:
      case INT:
      case LONG:
        {
          if (yAxisInputTransformation.isLongArithmeticAccurate()) {
            this.m_useLongGoal = true;
            if ((NumericalTypes.getTypes(goalValue) & NumericalTypes.IS_LONG) != 0) {
              this.m_goalValueLong = goalValue.longValue();
            } else {
              this.m_goalValueLong = ECDF.__doubleToLong(goalValue.doubleValue(), criterion);
            }

            this.m_goalValueDouble = this.m_goalValueLong;
            break;
          }
          // fall through
        }
        // $FALL-THROUGH$
      default:
        {
          this.m_goalValueDouble = goalValue.doubleValue();
          this.m_useLongGoal = false;
          this.m_goalValueLong = ECDF.__doubleToLong(this.m_goalValueDouble, criterion);
        }
    }

    this.m_criterion = criterion;
    this.m_aggregate = aggregate;
  }