org.deidentifier.arx.framework.check.history

## Class History

- java.lang.Object
- - org.deidentifier.arx.framework.check.history.History

    public class History
    extends java.lang.Object

The Class History.

Author:
  Fabian Prasser, Florian Kohlmayer

### Nested Class Summary

Nested Classes
`static class` `History.StorageStrategy` Two types of storage strategies for the history

### Constructor Summary

Constructors
Constructor and Description
`History(int rowCount, int size, double snapshotSizeDataset, double snapshotSizeSnapshot, ARXConfiguration.ARXConfigurationInternal config, IntArrayDictionary dictionarySensValue, IntArrayDictionary dictionarySensFreq, SolutionSpace<?> solutionSpace)` Creates a new history.

### Method Summary

All Methods Instance Methods Concrete Methods
`int[]` `get(int[] transformation)` Retrieves a snapshot.
`IntArrayDictionary` `getDictionarySensFreq()` Method needed for benchmarking.
`IntArrayDictionary` `getDictionarySensValue()` Method needed for benchmarking.
`DependentAction` `getStorageTrigger()` Returns the current storage strategy.
`int[]` `getTransformation()` Returns the node backing the last returned snapshot.
`void` `reset()` Clears the history.
`void` `setSize(int size)` Sets the size of this history.
`void` `setStorageStrategy(History.StorageStrategy strategy)` Sets the storage strategy
`boolean` `store(Transformation<?> transformation, HashGroupify groupify, int[] snapshot)` Stores a snapshot in the buffer.

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

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

### Constructor Detail

#### History

    public History(int rowCount,
                   int size,
                   double snapshotSizeDataset,
                   double snapshotSizeSnapshot,
                   ARXConfiguration.ARXConfigurationInternal config,
                   IntArrayDictionary dictionarySensValue,
                   IntArrayDictionary dictionarySensFreq,
                   SolutionSpace<?> solutionSpace)

Creates a new history.

Parameters:
  `rowCount` - the row count
  `size` - the max size
  `snapshotSizeDataset` - the snapshotSizeDataset
  `snapshotSizeSnapshot` -
  `config` -
  `dictionarySensValue` -
  `dictionarySensFreq` -
  `solutionSpace` -

### Method Detail

#### get

    public int[] get(int[] transformation)

Retrieves a snapshot.

Parameters:
  `transformation` -
Returns:
  snapshot

#### getDictionarySensFreq

    public IntArrayDictionary getDictionarySensFreq()

Method needed for benchmarking.

Returns:

#### getDictionarySensValue

    public IntArrayDictionary getDictionarySensValue()

Method needed for benchmarking.

Returns:

#### getStorageTrigger

    public DependentAction getStorageTrigger()

Returns the current storage strategy.

Returns:

#### getTransformation

    public int[] getTransformation()

Returns the node backing the last returned snapshot.

Returns:

#### reset

    public void reset()

Clears the history.

#### setSize

    public void setSize(int size)

Sets the size of this history.

Parameters:
  `size` -

#### setStorageStrategy

    public void setStorageStrategy(History.StorageStrategy strategy)

Sets the storage strategy

Parameters:
  `strategy` -

#### store

    public boolean store(Transformation<?> transformation,
                         HashGroupify groupify,
                         int[] snapshot)

Stores a snapshot in the buffer.

Parameters:
  `transformation` - The transformation
  `groupify` - The groupify operator
  `snapshot` - The snapshot that was previously used, if any
Returns: