public class DiagMatrix extends SparseMatrix
Constructor and Description |
---|
DiagMatrix(DiagMatrix mat) |
DiagMatrix(int rows,
int cols,
com.google.common.collect.Table<java.lang.Integer,java.lang.Integer,java.lang.Double> dataTable) |
Modifier and Type | Method and Description |
---|---|
DiagMatrix |
add(DiagMatrix that) |
DiagMatrix |
add(double val)
Each diagonal entry addes
val |
DiagMatrix |
clone()
Make a deep clone of current matrix
|
static DiagMatrix |
eye(int n) |
DiagMatrix |
minus(DiagMatrix that) |
DiagMatrix |
minus(double val)
Each diagonal entry abstracts
val |
DiagMatrix |
scale(double val) |
add, column, columns, columnSize, columnZeros, get, getColumnIndices, getData, getRowPointers, iterator, mean, numColumns, numRows, row, row, rows, rowSize, rowZeros, set, size, sum, toString, transpose
public DiagMatrix(int rows, int cols, com.google.common.collect.Table<java.lang.Integer,java.lang.Integer,java.lang.Double> dataTable)
public DiagMatrix(DiagMatrix mat)
public DiagMatrix clone()
SparseMatrix
clone
in class SparseMatrix
public DiagMatrix scale(double val)
public DiagMatrix add(DiagMatrix that)
public DiagMatrix add(double val)
val
val
- a value to be addedpublic DiagMatrix minus(DiagMatrix that)
public DiagMatrix minus(double val)
val
val
- a value to be abstractedpublic static DiagMatrix eye(int n)