org.deidentifier.arx.criteria

## Class SampleBasedCriterion

- java.lang.Object
- - org.deidentifier.arx.criteria.PrivacyCriterion
  - - org.deidentifier.arx.criteria.SampleBasedCriterion

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  RiskBasedCriterion

    public abstract class SampleBasedCriterion
    extends PrivacyCriterion

An abstract base class for sample-based privacy criteria.

Author:
  Fabian Prasser, Florian Kohlmayer
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`SampleBasedCriterion(boolean monotonicWithSuppression, boolean monotonicWithGeneralization)` Instantiates a new criterion.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract void` `enforce(HashGroupifyDistribution distribution, int numMaxSuppressedOutliers)` This method enforces the criterion on the current hash table.
`boolean` `isAnonymous(Transformation<?> node, HashGroupifyEntry entry)` Not supported by this type of criterion
`boolean` `isSampleBased()` Is this criterion based on the overall sample

### Methods inherited from class org.deidentifier.arx.criteria.PrivacyCriterion

`clone, clone, getDataSubset, getMinimalClassSize, getPopulationModel, getRequirements, getRiskThresholdJournalist, getRiskThresholdMarketer, getRiskThresholdProsecutor, getSubset, initialize, isHeuristicSearchSupported, isHeuristicSearchWithTimeLimitSupported, isLocalRecodingSupported, isMinimalClassSizeAvailable, isMonotonicWithGeneralization, isMonotonicWithSuppression, isOptimalSearchSupported, isSubsetAvailable, render, toString`

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

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

### Constructor Detail

#### SampleBasedCriterion

    public SampleBasedCriterion(boolean monotonicWithSuppression,
                                boolean monotonicWithGeneralization)

Instantiates a new criterion.

Parameters:
  `monotonicWithSuppression` -
  `monotonicWithGeneralization` -

### Method Detail

#### enforce

    public abstract void enforce(HashGroupifyDistribution distribution,
                                 int numMaxSuppressedOutliers)

This method enforces the criterion on the current hash table. Criteria can be enforced by suppressing classes in the distribution by passing a PrivacyCondition. Criteria may abort early, if the threshold is reached (`distribution.getNumOfSuppressedTuples() > numMaxSuppressedOutliers`).

Parameters:
  `distribution` -
  `numMaxSuppressedOutliers` -

#### isAnonymous

    public boolean isAnonymous(Transformation<?> node,
                               HashGroupifyEntry entry)

Not supported by this type of criterion

Specified by:
  `isAnonymous` in class `PrivacyCriterion`
Parameters:
  `entry` -
  `node` - TODO
Returns:

#### isSampleBased

    public boolean isSampleBased()

Description copied from class: `PrivacyCriterion`
Is this criterion based on the overall sample

Overrides:
  `isSampleBased` in class `PrivacyCriterion`
Returns: