# AbstractMetricMultiDimensional (ARX GUI Documentation)

org.deidentifier.arx.metric.v2

## Class AbstractMetricMultiDimensional

- java.lang.Object
- - org.deidentifier.arx.metric.Metric<AbstractILMultiDimensional>
  - - org.deidentifier.arx.metric.v2.AbstractMetricMultiDimensional

- All Implemented Interfaces:
    java.io.Serializable
  Direct Known Subclasses:
    AbstractMetricMultiDimensionalPotentiallyPrecomputed, MetricMDHeight, MetricMDNMLoss, MetricMDNMPrecision, MetricMDNUEntropyPrecomputed, MetricMDStatic

      public abstract class AbstractMetricMultiDimensional
      extends Metric<AbstractILMultiDimensional>

  This class provides an abstract skeleton for the implementation of multi-dimensional metrics.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.deidentifier.arx.metric.Metric

      `Metric.AggregateFunction`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected AbstractILMultiDimensional` | `createInformationLoss(double[] values)` Helper method for creating information loss.
    `protected ILMultiDimensionalWithBound` | `createInformationLossWithBound(double[] values, double[] bound)` Helper method for creating information loss.
    `protected ILMultiDimensionalWithBound` | `createInformationLossWithoutBound(double[] values)` Helper method for creating information loss.
    `InformationLoss<?>` | `createMaxInformationLoss()` Returns an instance of the maximal value.
    `InformationLoss<?>` | `createMinInformationLoss()` Returns an instance of the minimal value.
    `Metric.AggregateFunction` | `getAggregateFunction()` Returns the aggregate function of a multi-dimensional metric, null otherwise.
    `protected org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction[]` | `getAggregateFunctions()` Returns the aggregate functions used for microaggregation
    `protected int` | `getDimensions()` Returns the number of dimensions.
    `protected int` | `getDimensionsAggregated()` Returns the number of dimensions.
    `protected int` | `getDimensionsGeneralized()` Returns the number of dimensions.
    `protected double` | `getError(org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction function, org.deidentifier.arx.framework.check.distribution.Distribution distribution)` Returns the error induced by aggregating values in the distribution
    `protected org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction[]` | `getMicroaggregationFunctions()` Needed for microaggregation
    `protected int` | `getMicroaggregationStartIndex()` Needed for microaggregation
    `protected void` | `initialize(int dimensions)` For backwards compatibility only.
    `protected void` | `initializeInternal(org.deidentifier.arx.framework.data.DataManager manager, DataDefinition definition, org.deidentifier.arx.framework.data.Data input, org.deidentifier.arx.framework.data.GeneralizationHierarchy[] hierarchies, ARXConfiguration config)` Implement this to initialize the metric.
    `protected void` | `setMax(double[] max)` Sets the maximal information loss.
    `protected void` | `setMin(double[] min)` Sets the minimal information loss.

    - ### Methods inherited from class org.deidentifier.arx.metric.Metric

      `createAECSMetric, createAECSMetric, createAmbiguityMetric, createDiscernabilityMetric, createDiscernabilityMetric, createEntropyBasedInformationLossMetric, createEntropyBasedInformationLossMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createHeightMetric, createHeightMetric, createInstanceOfHighestScore, createInstanceOfLowestScore, createKLDivergenceMetric, createLossMetric, createLossMetric, createLossMetric, createLossMetric, createMetric, createNormalizedEntropyMetric, createNormalizedEntropyMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedLossMetric, createPrecomputedLossMetric, createPrecomputedLossMetric, createPrecomputedLossMetric, createPrecomputedNormalizedEntropyMetric, createPrecomputedNormalizedEntropyMetric, createPublisherPayoutMetric, createPublisherPayoutMetric, createStaticMetric, createStaticMetric, getConfiguration, getDescription, getDescription, getGeneralizationFactor, getGeneralizationSuppressionFactor, getInformationLoss, getInformationLoss, getInformationLossInternal, getInformationLossInternal, getLowerBound, getLowerBound, getLowerBoundInternal, getLowerBoundInternal, getName, getNumRecords, getSubset, getSuppressionFactor, initialize, isAbleToHandleMicroaggregation, isGSFactorSupported, isIndependent, isMonotonic, isMonotonicWithGeneralization, isMonotonicWithSuppression, isMultiDimensional, isPrecomputed, isWeighted, list, render, round, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### createMaxInformationLoss

          public InformationLoss<?> createMaxInformationLoss()

      Description copied from class: `Metric`
      Returns an instance of the maximal value.
      Specified by:
        `createMaxInformationLoss` in class `Metric<AbstractILMultiDimensional>`
      Returns:

    - #### createMinInformationLoss

          public InformationLoss<?> createMinInformationLoss()

      Description copied from class: `Metric`
      Returns an instance of the minimal value.
      Specified by:
        `createMinInformationLoss` in class `Metric<AbstractILMultiDimensional>`
      Returns:

    - #### getAggregateFunction

          public Metric.AggregateFunction getAggregateFunction()

      Description copied from class: `Metric`
      Returns the aggregate function of a multi-dimensional metric, null otherwise.
      Overrides:
        `getAggregateFunction` in class `Metric<AbstractILMultiDimensional>`
      Returns:

    - #### createInformationLoss

          protected AbstractILMultiDimensional createInformationLoss(double[] values)

      Helper method for creating information loss.
      Parameters:
        `values` -
      Returns:

    - #### createInformationLossWithBound

          protected ILMultiDimensionalWithBound createInformationLossWithBound(double[] values,
                                                                   double[] bound)

      Helper method for creating information loss.
      Parameters:
        `values` -
        `bound` -
      Returns:

    - #### createInformationLossWithoutBound

          protected ILMultiDimensionalWithBound createInformationLossWithoutBound(double[] values)

      Helper method for creating information loss.
      Parameters:
        `values` -
      Returns:

    - #### getAggregateFunctions

          protected org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction[] getAggregateFunctions()

      Returns the aggregate functions used for microaggregation
      Returns:

    - #### getDimensions

          protected int getDimensions()

      Returns the number of dimensions.
      Returns:

    - #### getDimensionsAggregated

          protected int getDimensionsAggregated()

      Returns the number of dimensions.
      Returns:

    - #### getDimensionsGeneralized

          protected int getDimensionsGeneralized()

      Returns the number of dimensions.
      Returns:

    - #### getError

          protected double getError(org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction function,
                        org.deidentifier.arx.framework.check.distribution.Distribution distribution)

      Returns the error induced by aggregating values in the distribution
      Parameters:
        `function` -
        `distribution` -
      Returns:

    - #### getMicroaggregationFunctions

          protected org.deidentifier.arx.framework.check.distribution.DistributionAggregateFunction[] getMicroaggregationFunctions()

      Needed for microaggregation
      Returns:

    - #### getMicroaggregationStartIndex

          protected int getMicroaggregationStartIndex()

      Needed for microaggregation
      Returns:

    - #### initialize

          protected void initialize(int dimensions)

      For backwards compatibility only.
      Parameters:
        `dimensions` -

    - #### initializeInternal

          protected void initializeInternal(org.deidentifier.arx.framework.data.DataManager manager,
                                DataDefinition definition,
                                org.deidentifier.arx.framework.data.Data input,
                                org.deidentifier.arx.framework.data.GeneralizationHierarchy[] hierarchies,
                                ARXConfiguration config)

      Description copied from class: `Metric`
      Implement this to initialize the metric.
      Specified by:
        `initializeInternal` in class `Metric<AbstractILMultiDimensional>`

    - #### setMax

          protected void setMax(double[] max)

      Sets the maximal information loss.
      Parameters:
        `max` -

    - #### setMin

          protected void setMin(double[] min)

      Sets the minimal information loss.
      Parameters:
        `min` -