public class DataManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DataManager.AttributeTypeInternal
Internal representation of attribute types.
|
Modifier | Constructor and Description |
---|---|
protected |
DataManager(Data dataAnalyzed,
Data dataGeneralized,
Data dataStatic,
java.lang.String[] header,
GeneralizationHierarchy[] hierarchiesGeneralized,
int[] hierarchiesHeights,
java.util.Map<java.lang.String,GeneralizationHierarchy> hierarchiesSensitive,
java.util.Map<java.lang.String,java.lang.Integer> indexesSensitive,
int[] maxLevels,
DistributionAggregateFunction[] microaggregationFunctions,
java.lang.String[] microaggregationHeader,
int[] microaggregationMap,
int microaggregationNumAttributes,
int microaggregationStartIndex,
int[] minLevels)
For creating a projected instance
|
|
DataManager(java.lang.String[] header,
int[][] data,
Dictionary dictionary,
DataDefinition definition,
java.util.Set<PrivacyCriterion> criteria,
java.util.Map<java.lang.String,DistributionAggregateFunction> functions)
Creates a new data manager from pre-encoded data.
|
Modifier and Type | Method and Description |
---|---|
Data |
getDataAnalyzed()
Returns the input data that will be analyzed.
|
Data |
getDataGeneralized()
Returns the input data that will be generalized.
|
Data |
getDataStatic()
Returns the static input data.
|
double[] |
getDistribution(int[][] data,
int index,
int distinctValues)
Returns the distribution of the attribute in the data array at the given index.
|
double[] |
getDistribution(java.lang.String attribute)
Returns the distribution of the given sensitive attribute in the original dataset.
|
java.lang.String[] |
getHeader()
The original data header.
|
int[] |
getHierachiesHeights()
Returns the heights of the hierarchiesQI.
|
GeneralizationHierarchy[] |
getHierarchies()
Returns the generalization hierarchiesQI.
|
int[] |
getHierarchiesMaxLevels()
Returns the maximum levels for the generalizaiton.
|
int[] |
getHierarchiesMinLevels()
Returns the minimum levels for the generalizations.
|
DistributionAggregateFunction[] |
getMicroaggregationFunctions()
Returns the microaggregation functions.
|
java.lang.String[] |
getMicroaggregationHeader()
Returns the header for the according buffer
|
int[] |
getMicroaggregationMap()
Returns the map for the according buffer
|
int |
getMicroaggregationNumAttributes()
Gets the number of attributes to which microaggregation will be applied
in dataAnalyzed.
|
int |
getMicroaggregationStartIndex()
Gets the start index of the attributes to which microaggregation will be
applied in dataAnalyzed.
|
DataManager |
getSubsetInstance(RowSet rowset)
Returns an instance of this data manager, that is projected onto the given rowset
|
int[] |
getTree(int[][] data,
int index,
int[][] hierarchy)
Returns a tree for the given attribute at the index within the given data array, using the given hierarchy.
|
int[] |
getTree(java.lang.String attribute)
Returns the tree for the given sensitive attribute, if a generalization hierarchy is associated.
|
protected DataManager(Data dataAnalyzed, Data dataGeneralized, Data dataStatic, java.lang.String[] header, GeneralizationHierarchy[] hierarchiesGeneralized, int[] hierarchiesHeights, java.util.Map<java.lang.String,GeneralizationHierarchy> hierarchiesSensitive, java.util.Map<java.lang.String,java.lang.Integer> indexesSensitive, int[] maxLevels, DistributionAggregateFunction[] microaggregationFunctions, java.lang.String[] microaggregationHeader, int[] microaggregationMap, int microaggregationNumAttributes, int microaggregationStartIndex, int[] minLevels)
dataAnalyzed
- dataGeneralized
- dataStatic
- header
- hierarchiesGeneralized
- hierarchiesHeights
- hierarchiesSensitive
- indexesSensitive
- maxLevels
- microaggregationFunctions
- microaggregationHeader
- microaggregationMap
- microaggregationNumAttributes
- microaggregationStartIndex
- minLevels
- public DataManager(java.lang.String[] header, int[][] data, Dictionary dictionary, DataDefinition definition, java.util.Set<PrivacyCriterion> criteria, java.util.Map<java.lang.String,DistributionAggregateFunction> functions)
header
- data
- dictionary
- definition
- criteria
- function
- public Data getDataAnalyzed()
public Data getDataGeneralized()
public Data getDataStatic()
public double[] getDistribution(int[][] data, int index, int distinctValues)
data
- index
- distinctValues
- public double[] getDistribution(java.lang.String attribute)
attribute
- public java.lang.String[] getHeader()
public int[] getHierachiesHeights()
public GeneralizationHierarchy[] getHierarchies()
public int[] getHierarchiesMaxLevels()
public int[] getHierarchiesMinLevels()
public DistributionAggregateFunction[] getMicroaggregationFunctions()
public java.lang.String[] getMicroaggregationHeader()
public int[] getMicroaggregationMap()
public int getMicroaggregationNumAttributes()
public int getMicroaggregationStartIndex()
public int[] getTree(int[][] data, int index, int[][] hierarchy)
data
- index
- hierarchy
- public int[] getTree(java.lang.String attribute)
attribute
- public DataManager getSubsetInstance(RowSet rowset)
rowset
-