org.deidentifier.arx.metric.v2

## Class DomainShareMaterialized

- java.lang.Object
- - org.deidentifier.arx.metric.v2.DomainShareMaterialized

All Implemented Interfaces:
  java.io.Serializable, DomainShare

    public class DomainShareMaterialized
    extends java.lang.Object
    implements DomainShare

This class represents a set of domain shares for an attribute. The shares are derived from a materialized generalization hierarchy. It is assumed that the complete domain of the attribute is represented in the hierarchy.

Author:
  Fabian Prasser
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`DomainShareMaterialized(java.lang.String[][] rawHierarchy, java.lang.String[] encodedValues, int[][] encodedHierarchy)` Creates a new set of domain shares derived from the given attribute.

### Method Summary

All Methods Instance Methods Concrete Methods
`DomainShareMaterialized` `clone()` Clones the share
`double` `getDomainSize()` Returns the size of the domain.
`double` `getShare(int value, int level)` Returns the share of the given value.

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

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

### Constructor Detail

#### DomainShareMaterialized

    public DomainShareMaterialized(java.lang.String[][] rawHierarchy,
                                   java.lang.String[] encodedValues,
                                   int[][] encodedHierarchy)

Creates a new set of domain shares derived from the given attribute.

Parameters:
  `rawHierarchy` -
  `encodedValues` -
  `encodedHierarchy` -

### Method Detail

#### clone

    public DomainShareMaterialized clone()

Description copied from interface: `DomainShare`
Clones the share

Specified by:
  `clone` in interface `DomainShare`
Overrides:
  `clone` in class `java.lang.Object`
Returns:

#### getDomainSize

    public double getDomainSize()

Returns the size of the domain.

Specified by:
  `getDomainSize` in interface `DomainShare`
Returns:

#### getShare

    public double getShare(int value,
                           int level)

Returns the share of the given value.

Specified by:
  `getShare` in interface `DomainShare`
Parameters:
  `value` -
  `level` -
Returns: