public class DataTableBackedCoolMapMatrix extends java.lang.Object implements CoolMapMatrix<java.lang.Double>
Constructor and Description |
---|
DataTableBackedCoolMapMatrix(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String rowId,
java.lang.String columnId,
double value) |
java.lang.String |
getColumnId(int columnIndex)
Get column ID(label) at columnIndex
|
java.util.List<java.lang.String> |
getColumnIds()
Get all column ids in a list ordered by column indices
|
java.lang.String |
getId()
Get the ID of the data matrix
|
java.util.Optional<java.lang.Integer> |
getIndexOfColumnById(java.lang.String columnId)
Given the ID of a column, looking for its index in the data matrix
|
java.util.Optional<java.lang.Integer> |
getIndexOfRowById(java.lang.String rowId)
Given the ID of a row, looking for its index in the data matrix
|
java.lang.Class<java.lang.Double> |
getMemberClass()
Get data type of the data matrix
|
java.lang.String |
getName()
Get data matrix name
|
int |
getNumberOfColumns()
Get number of columns in the data matrix
|
int |
getNumberOfRows()
Get number of rows in the data matrix
|
java.lang.String |
getRowId(int rowIndex)
Get row ID(label) at rowIndex
|
java.util.List<java.lang.String> |
getRowIds()
Get all row ids in a list ordered by row indices
|
java.lang.Double |
getValue(int rowIndex,
int columnIndex)
Get value at (rowIndex, columnIndex) from the data matrix
|
boolean |
hasColumn(java.lang.String columnId)
Check if the specified column ID is a valid
|
boolean |
hasRow(java.lang.String rowId)
Check if the specified row ID is a valid one
|
void |
setColumnIds(java.util.Set<java.lang.String> columnIds) |
void |
setName(java.lang.String newName)
Set or rename the data matrix
|
void |
setRowIds(java.util.Set<java.lang.String> rowIds) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canBeOverlaidTogether
public DataTableBackedCoolMapMatrix(java.lang.String name)
public void add(java.lang.String rowId, java.lang.String columnId, double value)
public void setRowIds(java.util.Set<java.lang.String> rowIds)
public void setColumnIds(java.util.Set<java.lang.String> columnIds)
public java.lang.Double getValue(int rowIndex, int columnIndex)
CoolMapMatrix
getValue
in interface CoolMapMatrix<java.lang.Double>
rowIndex
- index of rowcolumnIndex
- index of columnpublic java.lang.String getRowId(int rowIndex) throws java.lang.IndexOutOfBoundsException
CoolMapMatrix
getRowId
in interface CoolMapMatrix<java.lang.Double>
rowIndex
- index of rowjava.lang.IndexOutOfBoundsException
public java.lang.String getColumnId(int columnIndex)
CoolMapMatrix
getColumnId
in interface CoolMapMatrix<java.lang.Double>
columnIndex
- index of columnpublic boolean hasRow(java.lang.String rowId)
CoolMapMatrix
hasRow
in interface CoolMapMatrix<java.lang.Double>
rowId
- ID of rowpublic boolean hasColumn(java.lang.String columnId)
CoolMapMatrix
hasColumn
in interface CoolMapMatrix<java.lang.Double>
columnId
- ID of columnpublic java.util.Optional<java.lang.Integer> getIndexOfRowById(java.lang.String rowId)
CoolMapMatrix
getIndexOfRowById
in interface CoolMapMatrix<java.lang.Double>
rowId
- a row IDpublic java.util.Optional<java.lang.Integer> getIndexOfColumnById(java.lang.String columnId)
CoolMapMatrix
getIndexOfColumnById
in interface CoolMapMatrix<java.lang.Double>
columnId
- a column IDpublic int getNumberOfRows()
CoolMapMatrix
getNumberOfRows
in interface CoolMapMatrix<java.lang.Double>
public int getNumberOfColumns()
CoolMapMatrix
getNumberOfColumns
in interface CoolMapMatrix<java.lang.Double>
public java.util.List<java.lang.String> getRowIds()
CoolMapMatrix
getRowIds
in interface CoolMapMatrix<java.lang.Double>
public java.util.List<java.lang.String> getColumnIds()
CoolMapMatrix
getColumnIds
in interface CoolMapMatrix<java.lang.Double>
public java.lang.Class<java.lang.Double> getMemberClass()
CoolMapMatrix
getMemberClass
in interface CoolMapMatrix<java.lang.Double>
public java.lang.String getName()
CoolMapMatrix
getName
in interface CoolMapMatrix<java.lang.Double>
public void setName(java.lang.String newName)
CoolMapMatrix
setName
in interface CoolMapMatrix<java.lang.Double>
newName
- name to be setpublic java.lang.String getId()
CoolMapMatrix
getId
in interface CoolMapMatrix<java.lang.Double>