# HashGroupifyDistribution (ARX Developer Documentation)

org.deidentifier.arx.framework.check.groupify

## Class HashGroupifyDistribution

- java.lang.Object
- - org.deidentifier.arx.framework.check.groupify.HashGroupifyDistribution

-     public class HashGroupifyDistribution
      extends java.lang.Object

  A distribution of equivalence classes

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `HashGroupifyDistribution.PrivacyCondition` A condition that may or may not be fulfilled for the distribution

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getAverageClassSize()` Returns the average class size
    `double` | `getFractionOfRecordsInClassesOfSize(int size)` Returns the fraction of tuples that are in classes of the given size
    `RiskModelHistogram` | `getHistogram()` Returns a set of classes as an input for the risk model
    `int` | `getNumRecords()` Returns the number of records
    `int` | `getNumSuppressedRecords()` Returns the number of suppressed records
    `int` | `suppressWhileNotFulfilledBinary(HashGroupifyDistribution.PrivacyCondition condition)` Suppresses entries until the condition is fulfilled
    `int` | `suppressWhileNotFulfilledLinear(HashGroupifyDistribution.PrivacyCondition condition)` Suppresses entries until the condition is fulfilled

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

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

- - ### Method Detail

    - #### getAverageClassSize

          public double getAverageClassSize()

      Returns the average class size
      Returns:

    - #### getFractionOfRecordsInClassesOfSize

          public double getFractionOfRecordsInClassesOfSize(int size)

      Returns the fraction of tuples that are in classes of the given size
      Parameters:
        `size` -
      Returns:

    - #### getHistogram

          public RiskModelHistogram getHistogram()

      Returns a set of classes as an input for the risk model

    - #### getNumRecords

          public int getNumRecords()

      Returns the number of records
      Returns:

    - #### getNumSuppressedRecords

          public int getNumSuppressedRecords()

      Returns the number of suppressed records
      Returns:

    - #### suppressWhileNotFulfilledBinary

          public int suppressWhileNotFulfilledBinary(HashGroupifyDistribution.PrivacyCondition condition)

      Suppresses entries until the condition is fulfilled
      Parameters:
        `condition` -
      Returns:
        the number of tuples that have been suppressed

    - #### suppressWhileNotFulfilledLinear

          public int suppressWhileNotFulfilledLinear(HashGroupifyDistribution.PrivacyCondition condition)

      Suppresses entries until the condition is fulfilled
      Parameters:
        `condition` -
      Returns:
        the number of tuples that have been suppressed