# DataSubset (ARX GUI Documentation)

org.deidentifier.arx

## Class DataSubset

- java.lang.Object
- - org.deidentifier.arx.DataSubset

- All Implemented Interfaces:
    java.io.Serializable

      public class DataSubset
      extends java.lang.Object
      implements java.io.Serializable

  This class represents a the dataset that is to be de-identified as a subset of the given population table.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int[]` | `array` The subset as a sorted array of indices.
    `protected RowSet` | `set` The subset as a bitset.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `DataSubset` | `clone()` Clone
    `static DataSubset` | `create(Data data, Data subset)` Create a subset by matching two data instances.
    `static DataSubset` | `create(Data data, DataSelector selector)` Creates a subset from the given selector.
    `static DataSubset` | `create(Data data, RowSet subset)` Creates a new subset from the given row set, from which a copy is created.
    `static DataSubset` | `create(Data data, java.util.Set<java.lang.Integer> subset)` Creates a new subset from the given set of tuple indices.
    `static DataSubset` | `create(int rows, RowSet subset)` Creates a new subset from the given row set, from which a copy is created.
    `static DataSubset` | `create(int rows, java.util.Set<java.lang.Integer> subset)` Creates a new subset from the given set of tuple indices.
    `int[]` | `getArray()` Getter
    `RowSet` | `getSet()` Getter
    `int` | `getSize()` Returns the size of the data subset
    `protected DataSubset` | `getSubsetInstance(RowSet rowset)` Returns a new data subset, only containing those rows that are included in the subset

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

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

- - ### Field Detail

    - #### set

          protected RowSet set

      The subset as a bitset.

    - #### array

          protected int[] array

      The subset as a sorted array of indices.

  - ### Method Detail

    - #### create

          public static DataSubset create(Data data,
                          Data subset)

      Create a subset by matching two data instances.
      Parameters:
        `data` -
        `subset` -
      Returns:

    - #### create

          public static DataSubset create(Data data,
                          DataSelector selector)

      Creates a subset from the given selector.
      Parameters:
        `data` -
        `selector` -
      Returns:

    - #### create

          public static DataSubset create(Data data,
                          RowSet subset)

      Creates a new subset from the given row set, from which a copy is created.
      Parameters:
        `data` -
        `subset` -
      Returns:

    - #### create

          public static DataSubset create(Data data,
                          java.util.Set<java.lang.Integer> subset)

      Creates a new subset from the given set of tuple indices.
      Parameters:
        `data` -
        `subset` -
      Returns:

    - #### create

          public static DataSubset create(int rows,
                          RowSet subset)

      Creates a new subset from the given row set, from which a copy is created.
      Parameters:
        `data` -
        `subset` -
      Returns:

    - #### create

          public static DataSubset create(int rows,
                          java.util.Set<java.lang.Integer> subset)

      Creates a new subset from the given set of tuple indices.
      Parameters:
        `rows` -
        `subset` -
      Returns:

    - #### clone

          public DataSubset clone()

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

    - #### getArray

          public int[] getArray()

      Getter
      Returns:

    - #### getSet

          public RowSet getSet()

      Getter
      Returns:

    - #### getSize

          public int getSize()

      Returns the size of the data subset
      Returns:

    - #### getSubsetInstance

          protected DataSubset getSubsetInstance(RowSet rowset)

      Returns a new data subset, only containing those rows that are included in the subset
      Parameters:
        `rowset` -
      Returns: