org.deidentifier.arx.framework.data

## Class DataMatrixSubset

- java.lang.Object
- - org.deidentifier.arx.framework.data.DataMatrix
  - - org.deidentifier.arx.framework.data.DataMatrixSubset

All Implemented Interfaces:
  java.io.Serializable

    public class DataMatrixSubset
    extends DataMatrix

A subset of a data matrix

Author:
  Fabian Prasser
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`DataMatrixSubset(DataMatrix matrix, int[] subset)` Creates a new instance

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `and(int row, int value)` ANDs the first value of the row with the given value
`DataMatrix` `clone()`
`boolean` `equals(int row1, int row2)` Compares two rows for equality
`boolean` `equals(int row, int[] data)` Returns whether the given row has the given data
`boolean` `equalsIgnoringOutliers(int row1, int row2)` Equals ignoring outliers
`int` `get(int row, int col)` Returns the specified value
`int` `getNumColumns()` Returns the number of columns
`int` `getNumRows()` Returns the number of rows
`int` `getValueAtColumn(int column)` Gets the value in the given column for the row which has been set via setRow(row).
`int` `hashCode(int row)` Returns an hashcode for the given row
`boolean` `iterator_hasNext()` First iterator
`int` `iterator_next()` First iterator
`void` `iterator_write(int value)` First iterator
`void` `iterator(int row)` First iterator
`void` `or(int row, int value)` ORs the first value of the row with the given value
`void` `set(int row, int column, int value)` Sets a value
`void` `setRow(int row)` Sets the row index for data access
`void` `setRow(int row, int[] data)` Sets the data for one row
`void` `setValueAtColumn(int column, int value)` Sets the value in the given column for the row which has been set via setRow(row).
`void` `swap(int row1, int row2)` Swaps the data in both rows

### Methods inherited from class org.deidentifier.arx.framework.data.DataMatrix

`copyFrom, equalsIgnore, hashCode, hashCodeIgnore`

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

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

### Constructor Detail

#### DataMatrixSubset

    public DataMatrixSubset(DataMatrix matrix,
                            int[] subset)

Creates a new instance

Parameters:
  `matrix` -
  `subset` -

### Method Detail

#### and

    public void and(int row,
                    int value)

Description copied from class: `DataMatrix`
ANDs the first value of the row with the given value

Overrides:
  `and` in class `DataMatrix`

#### clone

    public DataMatrix clone()

Overrides:
  `clone` in class `DataMatrix`

#### equals

    public boolean equals(int row1,
                          int row2)

Description copied from class: `DataMatrix`
Compares two rows for equality

Overrides:
  `equals` in class `DataMatrix`
Returns:

#### equals

    public boolean equals(int row,
                          int[] data)

Description copied from class: `DataMatrix`
Returns whether the given row has the given data

Overrides:
  `equals` in class `DataMatrix`
Returns:

#### equalsIgnoringOutliers

    public boolean equalsIgnoringOutliers(int row1,
                                          int row2)

Description copied from class: `DataMatrix`
Equals ignoring outliers

Overrides:
  `equalsIgnoringOutliers` in class `DataMatrix`
Returns:

#### get

    public int get(int row,
                   int col)

Description copied from class: `DataMatrix`
Returns the specified value

Overrides:
  `get` in class `DataMatrix`
Returns:

#### getNumColumns

    public int getNumColumns()

Description copied from class: `DataMatrix`
Returns the number of columns

Overrides:
  `getNumColumns` in class `DataMatrix`
Returns:

#### getNumRows

    public int getNumRows()

Description copied from class: `DataMatrix`
Returns the number of rows

Overrides:
  `getNumRows` in class `DataMatrix`
Returns:

#### getValueAtColumn

    public int getValueAtColumn(int column)

Description copied from class: `DataMatrix`
Gets the value in the given column for the row which has been set via setRow(row).

Overrides:
  `getValueAtColumn` in class `DataMatrix`

#### hashCode

    public int hashCode(int row)

Description copied from class: `DataMatrix`
Returns an hashcode for the given row

Overrides:
  `hashCode` in class `DataMatrix`
Returns:

#### iterator

    public void iterator(int row)

Description copied from class: `DataMatrix`
First iterator

Overrides:
  `iterator` in class `DataMatrix`

#### iterator_hasNext

    public boolean iterator_hasNext()

Description copied from class: `DataMatrix`
First iterator

Overrides:
  `iterator_hasNext` in class `DataMatrix`
Returns:

#### iterator_next

    public int iterator_next()

Description copied from class: `DataMatrix`
First iterator

Overrides:
  `iterator_next` in class `DataMatrix`
Returns:

#### iterator_write

    public void iterator_write(int value)

Description copied from class: `DataMatrix`
First iterator

Overrides:
  `iterator_write` in class `DataMatrix`

#### or

    public void or(int row,
                   int value)

Description copied from class: `DataMatrix`
ORs the first value of the row with the given value

Overrides:
  `or` in class `DataMatrix`

#### set

    public void set(int row,
                    int column,
                    int value)

Description copied from class: `DataMatrix`
Sets a value

Overrides:
  `set` in class `DataMatrix`

#### setRow

    public void setRow(int row)

Description copied from class: `DataMatrix`
Sets the row index for data access

Overrides:
  `setRow` in class `DataMatrix`

#### setRow

    public void setRow(int row,
                       int[] data)

Description copied from class: `DataMatrix`
Sets the data for one row

Overrides:
  `setRow` in class `DataMatrix`

#### setValueAtColumn

    public void setValueAtColumn(int column,
                                 int value)

Description copied from class: `DataMatrix`
Sets the value in the given column for the row which has been set via setRow(row).

Overrides:
  `setValueAtColumn` in class `DataMatrix`

#### swap

    public void swap(int row1,
                     int row2)

Description copied from class: `DataMatrix`
Swaps the data in both rows

Overrides:
  `swap` in class `DataMatrix`