Klasse DataMatrix
java.lang.Object
org.deidentifier.arx.framework.data.DataMatrix
- Alle implementierten Schnittstellen:
Serializable
- Bekannte direkte Unterklassen:
DataMatrixSubset
A fast implementation of an array of arrays of equal size
- Siehe auch:
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidand(int row, int value) ANDs the first value of the row with the given valueclone()protected DataMatrixclone(int[] subset) Clones only a subset of the recordsvoidcopyFrom(int row, DataMatrix sourceMatrix, int sourceRow) Copies a row from the given matrix into this matrixbooleanequals(int row1, int row2) Compares two rows for equalitybooleanequals(int row, int[] data) Returns whether the given row has the given databooleanequalsIgnore(int row1, int row2, int ignore) Internal equalsbooleanequalsIgnoringOutliers(int row1, int row2) Equals ignoring outliersintget(int row, int col) Returns the specified valueintReturns the number of columnsintReturns the number of rowsintgetValueAtColumn(int column) Gets the value in the given column for the row which has been set via setRow(row).inthashCode(int row) Returns an hashcode for the given rowfinal inthashCode(int[] array) Computes a hashcode for an integer array, partially unrolled.inthashCodeIgnore(int row, int ignore) Returns an hashcode for the given rowvoiditerator(int row) First iteratorbooleanFirst iteratorintFirst iteratorvoiditerator_write(int value) First iteratorvoidor(int row, int value) ORs the first value of the row with the given valuevoidset(int row, int column, int value) Sets a valuevoidsetRow(int row) Sets the row index for data accessvoidsetRow(int row, int[] data) Sets the data for one rowvoidsetValueAtColumn(int column, int value) Sets the value in the given column for the row which has been set via setRow(row).voidswap(int row1, int row2) Swaps the data in both rows
-
Konstruktordetails
-
DataMatrix
public DataMatrix(int rows, int columns) Instantiates a new memory block.- Parameter:
rows- the num rowscolumns- 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
-
copyFrom
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
Clones only a subset of the records- Parameter:
subset-- Gibt zurück:
-