Klasse DataMatrix

java.lang.Object
org.deidentifier.arx.framework.data.DataMatrix
Alle implementierten Schnittstellen:
Serializable
Bekannte direkte Unterklassen:
DataMatrixSubset

public class DataMatrix extends Object implements Serializable
A fast implementation of an array of arrays of equal size
Siehe auch:
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    DataMatrix(int rows, int columns)
    Instantiates a new memory block.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    and(int row, int value)
    ANDs the first value of the row with the given value
     
    protected DataMatrix
    clone(int[] subset)
    Clones only a subset of the records
    void
    copyFrom(int row, DataMatrix sourceMatrix, int sourceRow)
    Copies a row from the given matrix into this matrix
    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
    equalsIgnore(int row1, int row2, int ignore)
    Internal equals
    boolean
    equalsIgnoringOutliers(int row1, int row2)
    Equals ignoring outliers
    int
    get(int row, int col)
    Returns the specified value
    int
    Returns the number of columns
    int
    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
    final int
    hashCode(int[] array)
    Computes a hashcode for an integer array, partially unrolled.
    int
    hashCodeIgnore(int row, int ignore)
    Returns an hashcode for the given row
    void
    iterator(int row)
    First iterator
    boolean
    First iterator
    int
    First iterator
    void
    iterator_write(int value)
    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

    Von Klasse geerbte Methoden java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • DataMatrix

      public DataMatrix(int rows, int columns)
      Instantiates a new memory block.
      Parameter:
      rows - the num rows
      columns - the num columns
  • Methodendetails

    • and

      public void and(int row, int value)
      ANDs the first value of the row with the given value
      Parameter:
      row -
      value -
    • clone

      public DataMatrix clone()
      Setzt außer Kraft:
      clone in Klasse Object
    • copyFrom

      public void copyFrom(int row, DataMatrix sourceMatrix, int sourceRow)
      Copies a row from the given matrix into this matrix
      Parameter:
      row -
      sourceMatrix -
      sourceRow -
    • equals

      public boolean equals(int row1, int row2)
      Compares two rows for equality
      Parameter:
      row1 -
      row2 -
      Gibt zurück:
    • equals

      public boolean equals(int row, int[] data)
      Returns whether the given row has the given data
      Parameter:
      row -
      data -
      Gibt zurück:
    • equalsIgnore

      public boolean equalsIgnore(int row1, int row2, int ignore)
      Internal equals
      Parameter:
      row1 -
      row2 -
      ignore -
      Gibt zurück:
    • equalsIgnoringOutliers

      public boolean equalsIgnoringOutliers(int row1, int row2)
      Equals ignoring outliers
      Parameter:
      row1 -
      row2 -
      Gibt zurück:
    • get

      public int get(int row, int col)
      Returns the specified value
      Parameter:
      row -
      col -
      Gibt zurück:
    • getNumColumns

      public int getNumColumns()
      Returns the number of columns
      Gibt zurück:
    • getNumRows

      public int getNumRows()
      Returns the number of rows
      Gibt zurück:
    • getValueAtColumn

      public int getValueAtColumn(int column)
      Gets the value in the given column for the row which has been set via setRow(row).
      Parameter:
      column -
      value -
    • hashCode

      public int hashCode(int row)
      Returns an hashcode for the given row
      Parameter:
      row -
      Gibt zurück:
    • hashCode

      public final int hashCode(int[] array)
      Computes a hashcode for an integer array, partially unrolled.
      Parameter:
      array -
      Gibt zurück:
      the hashcode
    • hashCodeIgnore

      public int hashCodeIgnore(int row, int ignore)
      Returns an hashcode for the given row
      Parameter:
      row -
      ignore -
      Gibt zurück:
    • iterator

      public void iterator(int row)
      First iterator
      Parameter:
      row -
    • iterator_hasNext

      public boolean iterator_hasNext()
      First iterator
      Gibt zurück:
    • iterator_next

      public int iterator_next()
      First iterator
      Gibt zurück:
    • iterator_write

      public void iterator_write(int value)
      First iterator
      Parameter:
      value -
    • or

      public void or(int row, int value)
      ORs the first value of the row with the given value
      Parameter:
      row -
      value -
    • set

      public void set(int row, int column, int value)
      Sets a value
      Parameter:
      row -
      column -
      value -
    • setRow

      public void setRow(int row)
      Sets the row index for data access
      Parameter:
      row -
    • setRow

      public void setRow(int row, int[] data)
      Sets the data for one row
      Parameter:
      row -
      data -
    • setValueAtColumn

      public void setValueAtColumn(int column, int value)
      Sets the value in the given column for the row which has been set via setRow(row).
      Parameter:
      column -
      value -
    • swap

      public void swap(int row1, int row2)
      Swaps the data in both rows
      Parameter:
      row1 -
      row2 -
    • clone

      protected DataMatrix clone(int[] subset)
      Clones only a subset of the records
      Parameter:
      subset -
      Gibt zurück: