public class SparseRaggedDoubleMatrix<R,C> extends DoubleMatrix<R,C>
MAX_ROWS_TO_PRINT| Constructor and Description |
|---|
SparseRaggedDoubleMatrix() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRow(R name,
cern.colt.matrix.DoubleMatrix1D matrix1D) |
void |
addRow(R name,
cern.colt.list.IntArrayList indexes,
cern.colt.list.DoubleArrayList values) |
double[][] |
asArray() |
int |
columns()
Returns the size of the widest row.
|
DoubleMatrix<R,C> |
copy()
Create a deep copy of this
|
double |
get(int i,
int j) |
Double[] |
getColObj(int col) |
DoubleMatrix<R,C> |
getColRange(int startCol,
int endCol) |
double[] |
getColumn(int col) |
Double |
getObject(int row,
int col) |
double[] |
getRow(int i) |
cern.colt.list.DoubleArrayList |
getRowArrayList(int row)
This gives just the list of values in the row - make sure this is what you want.
|
Double[] |
getRowObj(int i) |
DoubleMatrix<R,C> |
getRowRange(int startRow,
int endRow) |
boolean |
isMissing(int i,
int j)
(non-Javadoc) Note that in a sparse matrix, zero values are considered "missing"!
|
int |
rows()
Get the number of rows the matrix has
|
void |
set(int i,
int j,
Double d) |
int |
size() |
DoubleMatrix<R,C> |
subsetColumns(List<C> c)
Create a copy of this matrix with only the selected columns, in the selected order.
|
DoubleMatrix<R,C> |
subsetRows(List<R> rowNames)
Create a copy of this matrix with only the selected rows, in the selected order.
|
DoubleMatrix<C,R> |
transpose() |
cern.colt.matrix.DoubleMatrix1D |
viewColumn(int column) |
cern.colt.matrix.DoubleMatrix1D |
viewRow(int i) |
getByKeys, getColumnByName, getEntry, getRawMatrix, getRowByName, setByKeys, sortByColumnAbsoluteValues, toStringaddColumnName, addRowName, asDoubles, assign, checkColRange, checkRowRange, containsColumnName, containsRowName, getColIndexByName, getColName, getColNames, getRowIndexByName, getRowName, getRowNameMapIterator, getRowNames, hasColNames, hasMissingValues, hasRow, hasRowNames, numMissing, setColumnName, setColumnNames, setRowName, setRowNamesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddColumnName, asDoubles, assign, containsColumnName, containsRowName, getColIndexByName, getColName, getColNames, getRowIndexByName, getRowName, getRowNameMapIterator, getRowNames, hasColNames, hasRow, hasRowNames, numMissing, setColumnName, setColumnNames, setRowName, setRowNamespublic void addRow(R name, cern.colt.matrix.DoubleMatrix1D matrix1D)
matrix1D - public void addRow(R name, cern.colt.list.IntArrayList indexes, cern.colt.list.DoubleArrayList values)
name - indexes - values - public double[][] asArray()
asArray in class DoubleMatrix<R,C>public int columns()
basecode.dataStructure.matrix.Matrix2D#columns()public DoubleMatrix<R,C> copy()
DoubleMatrixcopy in class DoubleMatrix<R,C>public double get(int i,
int j)
get in class DoubleMatrix<R,C>row - column - public Double[] getColObj(int col)
public DoubleMatrix<R,C> getColRange(int startCol, int endCol)
getColRange in class DoubleMatrix<R,C>startCol - inclusive, numbered from zeroendCol - inclusive, numbered from zeropublic double[] getColumn(int col)
getColumn in class DoubleMatrix<R,C>public Double getObject(int row, int col)
public double[] getRow(int i)
getRow in class DoubleMatrix<R,C>public cern.colt.list.DoubleArrayList getRowArrayList(int row)
getRowArrayList in class DoubleMatrix<R,C>row - public Double[] getRowObj(int i)
public DoubleMatrix<R,C> getRowRange(int startRow, int endRow)
getRowRange in class DoubleMatrix<R,C>startRow - inclusive, numbered from zeroendRow - inclusivepublic boolean isMissing(int i,
int j)
i - rowj - columnbasecode.dataStructure.matrix.Matrix2D#isMissing(int, int)public int rows()
Matrix2Dpublic void set(int i,
int j,
Double d)
public int size()
size in class AbstractMatrix<R,C,Double>public DoubleMatrix<R,C> subsetColumns(List<C> c)
DoubleMatrixsubsetColumns in class DoubleMatrix<R,C>public DoubleMatrix<R,C> subsetRows(List<R> rowNames)
DoubleMatrixsubsetRows in class DoubleMatrix<R,C>public DoubleMatrix<C,R> transpose()
transpose in class DoubleMatrix<R,C>public cern.colt.matrix.DoubleMatrix1D viewColumn(int column)
viewColumn in class DoubleMatrix<R,C>public cern.colt.matrix.DoubleMatrix1D viewRow(int i)
viewRow in class DoubleMatrix<R,C>Copyright © 2003–2023 UBC Michael Smith Laboratories. All rights reserved.