public class History
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
History.StorageStrategy
Two types of storage strategies for the history
|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public History(int rowCount, int size, double snapshotSizeDataset, double snapshotSizeSnapshot, ARXConfiguration.ARXConfigurationInternal config, IntArrayDictionary dictionarySensValue, IntArrayDictionary dictionarySensFreq, SolutionSpace<?> solutionSpace)
rowCount
- the row countsize
- the max sizesnapshotSizeDataset
- the snapshotSizeDatasetsnapshotSizeSnapshot
- config
- dictionarySensValue
- dictionarySensFreq
- solutionSpace
- public int[] get(int[] transformation)
transformation
- public IntArrayDictionary getDictionarySensFreq()
public IntArrayDictionary getDictionarySensValue()
public DependentAction getStorageTrigger()
public int[] getTransformation()
public void reset()
public void setSize(int size)
size
- public void setStorageStrategy(History.StorageStrategy strategy)
strategy
- public boolean store(Transformation<?> transformation, HashGroupify groupify, int[] snapshot)
transformation
- The transformationgroupify
- The groupify operatorsnapshot
- The snapshot that was previously used, if any