org.deidentifier.arx.criteria

## Enum EntropyLDiversity.EntropyEstimator

- java.lang.Object
- - java.lang.Enum<EntropyLDiversity.EntropyEstimator>
  - - org.deidentifier.arx.criteria.EntropyLDiversity.EntropyEstimator

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<EntropyLDiversity.EntropyEstimator>

Enclosing class:
  EntropyLDiversity

    public static enum EntropyLDiversity.EntropyEstimator
    extends java.lang.Enum<EntropyLDiversity.EntropyEstimator>

Enumerator of entropy estimators for the entropy-l-diversity privacy model. This enumerator actually holds the logarithm substitute \psi for entropy estimation via the formula $H = \psi(N) - 1/N \sum n \psi (n)$

Author:
  Sebastian Stammler

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`GRASSBERGER` The Grassberger estimator
`SHANNON` The Shannon estimator

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`double` `psi(int n)` The logarithm substitute of the current estimator The difference in estimating the entropy by the naive Shannon or Grassberger estimator is actually using log or G for \psi in the entropy formula $H = \psi(N) - 1/N \sum n \psi(n)$ where N is the size of the set and the sum goes over all values of the sensitive attribute, n is the count of the current sensitive attribute
`java.lang.String` `toString()`
`static EntropyLDiversity.EntropyEstimator` `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static EntropyLDiversity.EntropyEstimator[]` `values()` Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf`

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

`getClass, notify, notifyAll, wait, wait, wait`

### Enum Constant Detail

#### SHANNON

    public static final EntropyLDiversity.EntropyEstimator SHANNON

The Shannon estimator

#### GRASSBERGER

    public static final EntropyLDiversity.EntropyEstimator GRASSBERGER

The Grassberger estimator

### Method Detail

#### values

    public static EntropyLDiversity.EntropyEstimator[] values()

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

    for (EntropyLDiversity.EntropyEstimator c : EntropyLDiversity.EntropyEstimator.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static EntropyLDiversity.EntropyEstimator valueOf(java.lang.String name)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
  `java.lang.NullPointerException` - if the argument is null

#### psi

    public double psi(int n)

The logarithm substitute of the current estimator The difference in estimating the entropy by the naive Shannon or Grassberger estimator is actually using log or G for \psi in the entropy formula $H = \psi(N) - 1/N \sum n \psi(n)$ where N is the size of the set and the sum goes over all values of the sensitive attribute, n is the count of the current sensitive attribute

Parameters:
  `n` -
Returns:
  The logarithm substitute of the estimator

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Enum<EntropyLDiversity.EntropyEstimator>`