org.deidentifier.arx.framework.data

## Class Data

- java.lang.Object
- - org.deidentifier.arx.framework.data.Data

All Implemented Interfaces:
  java.io.Serializable, java.lang.Cloneable

    public class Data
    extends java.lang.Object
    implements java.lang.Cloneable, java.io.Serializable

Encodes a data object consisting of a dictionary encoded two-dimensional array, an associated dictionary, a header and a mapping to the columns in the input data set.

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

### Field Summary

Fields
`static int` `OUTLIER_MASK` The outliers mask.
`static int` `REMOVE_OUTLIER_MASK` The inverse outliers mask.

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`Data` `clone()`
`static Data` `createProjection(DataMatrix data, java.lang.String[] header, int[] columns, Dictionary dictionary)` Creates an object which projects the given data onto the given set of columns
`static Data` `createWrapper(DataMatrix data, java.lang.String[] header, int[] columns, Dictionary dictionary)` Creates an object which simply encapsulates the provided objects
`DataMatrix` `getArray()` Returns the data array.
`int[]` `getColumns()` Returns the set of columns from the input data set stored in this object.
`int` `getDataLength()` Returns the number of rows.
`Dictionary` `getDictionary()` Returns the dictionary.
`java.lang.String[]` `getHeader()` Returns the header.
`int` `getIndexOf(java.lang.String attribute)` Returns the index of the given attribute.
`Data` `getSubsetInstance(RowSet rowset)` Returns a new instance that is projected onto the given subset
`boolean` `isEmpty()` Returns whether this object is empty

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

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

### Field Detail

#### OUTLIER_MASK

    public static final int OUTLIER_MASK

The outliers mask.

See Also:
  Constant Field Values

#### REMOVE_OUTLIER_MASK

    public static final int REMOVE_OUTLIER_MASK

The inverse outliers mask.

See Also:
  Constant Field Values

### Method Detail

#### createProjection

    public static Data createProjection(DataMatrix data,
                                        java.lang.String[] header,
                                        int[] columns,
                                        Dictionary dictionary)

Creates an object which projects the given data onto the given set of columns

Parameters:
  `data` -
  `header` -
  `columns` -
  `dictionary` -
Returns:

#### createWrapper

    public static Data createWrapper(DataMatrix data,
                                     java.lang.String[] header,
                                     int[] columns,
                                     Dictionary dictionary)

Creates an object which simply encapsulates the provided objects

Parameters:
  `data` -
  `header` -
  `columns` -
  `dictionary` -
Returns:

#### clone

    public Data clone()

Overrides:
  `clone` in class `java.lang.Object`

#### getArray

    public DataMatrix getArray()

Returns the data array.

Returns:

#### getColumns

    public int[] getColumns()

Returns the set of columns from the input data set stored in this object.

Returns:

#### getDataLength

    public int getDataLength()

Returns the number of rows.

Returns:
  the data length

#### getDictionary

    public Dictionary getDictionary()

Returns the dictionary.

Returns:

#### getHeader

    public java.lang.String[] getHeader()

Returns the header.

Returns:

#### getIndexOf

    public int getIndexOf(java.lang.String attribute)

Returns the index of the given attribute. Returns -1 if the attribute is not contained.

Parameters:
  `attribute` -
Returns:

#### getSubsetInstance

    public Data getSubsetInstance(RowSet rowset)

Returns a new instance that is projected onto the given subset

Parameters:
  `rowset` -
Returns:

#### isEmpty

    public boolean isEmpty()

Returns whether this object is empty

Returns: