public class DenseDoubleMatrix<R,C> extends DoubleMatrix<R,C>
MAX_ROWS_TO_PRINT| Constructor and Description |
|---|
DenseDoubleMatrix(double[][] T) |
DenseDoubleMatrix(int rows,
int cols) |
| Modifier and Type | Method and Description |
|---|---|
double[][] |
asArray() |
int |
columns()
Get the number of columns the matrix has.
|
DoubleMatrix<R,C> |
copy()
Create a deep copy of this
|
double |
get(int row,
int column) |
double[] |
getColByName(C s)
Return a copy of a given column.
|
Double[] |
getColObj(int col) |
DoubleMatrix<R,C> |
getColRange(int startCol,
int endCol) |
double[] |
getColumn(int col) |
Double |
getObject(int row,
int col)
Converts to a String that can be read by read.table in R, using default parameters
|
double[] |
getRow(int row)
Return a reference to a specific row.
|
cern.colt.list.DoubleArrayList |
getRowArrayList(int i) |
double[] |
getRowByName(R s)
Return a reference to a specific row.
|
Double[] |
getRowObj(int row) |
DoubleMatrix<R,C> |
getRowRange(int startRow,
int endRow) |
boolean |
isMissing(int i,
int j)
Check if the value at a given index is missing.
|
int |
rows()
Get the number of rows the matrix has
|
void |
set(int row,
int column,
Double value) |
int |
size() |
DoubleMatrix<R,C> |
subsetColumns(List<C> columns)
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 row) |
getByKeys, getColumnByName, getEntry, getRawMatrix, 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 DenseDoubleMatrix(double[][] T)
T - double[][]public DenseDoubleMatrix(int rows,
int cols)
rows - intcols - intpublic double[][] asArray()
asArray in class DoubleMatrix<R,C>public int columns()
Matrix2Dpublic DoubleMatrix<R,C> copy()
DoubleMatrixcopy in class DoubleMatrix<R,C>public double get(int row,
int column)
get in class DoubleMatrix<R,C>row - intcolumn - intDoubleMatrix2D.get(int, int)public double[] getColByName(C s)
col - intpublic 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 row)
getRow in class DoubleMatrix<R,C>row - intpublic cern.colt.list.DoubleArrayList getRowArrayList(int i)
getRowArrayList in class DoubleMatrix<R,C>public double[] getRowByName(R s)
getRowByName in class DoubleMatrix<R,C>s - Stringpublic Double[] getRowObj(int row)
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)
Matrix2Di - rowj - columnpublic int rows()
Matrix2Dpublic void set(int row,
int column,
Double value)
public int size()
size in class AbstractMatrix<R,C,Double>AbstractMatrix2D.size()public DoubleMatrix<R,C> subsetColumns(List<C> columns)
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>column - intpublic cern.colt.matrix.DoubleMatrix1D viewRow(int row)
viewRow in class DoubleMatrix<R,C>row - intviewRow(int)Copyright © 2003–2023 UBC Michael Smith Laboratories. All rights reserved.