public class DenseMatrix extends Object implements Matrix, scala.Serializable, scala.Product
Matrix
. Stores data in column major order in a continuous
double array.
param: numRows Number of rows param: numCols Number of columns param: data Array of matrix elements in column major order
Constructor and Description |
---|
DenseMatrix(int numRows,
int numCols,
double[] data) |
Modifier and Type | Method and Description |
---|---|
double |
apply(int row,
int col)
Element wise access function
|
abstract static boolean |
canEqual(Object that) |
DenseMatrix |
copy()
Copies the matrix instance
|
double[] |
data() |
boolean |
equals(Object obj) |
static boolean |
equalsMatrix(Matrix matrix) |
static DenseMatrix |
eye(int numRows,
int numCols) |
int |
hashCode() |
static int |
LINE_WIDTH() |
static int |
MAX_ROWS() |
int |
numCols()
Number of columns
|
int |
numRows()
Number of rows
|
abstract static int |
productArity() |
abstract static Object |
productElement(int n) |
static scala.collection.Iterator<Object> |
productIterator() |
static String |
productPrefix() |
SparseMatrix |
toSparseMatrix()
Converts the DenseMatrix to a SparseMatrix
|
String |
toString() |
void |
update(int row,
int col,
double value)
Element wise update function
|
static DenseMatrix |
zeros(int numRows,
int numCols) |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
equalsMatrix
public static int LINE_WIDTH()
public static int MAX_ROWS()
public static DenseMatrix zeros(int numRows, int numCols)
public static DenseMatrix eye(int numRows, int numCols)
public static boolean equalsMatrix(Matrix matrix)
public abstract static boolean canEqual(Object that)
public abstract static Object productElement(int n)
public abstract static int productArity()
public static scala.collection.Iterator<Object> productIterator()
public static String productPrefix()
public int numRows()
Matrix
public int numCols()
Matrix
public double[] data()
public double apply(int row, int col)
public boolean equals(Object obj)
public void update(int row, int col, double value)
public SparseMatrix toSparseMatrix()
public DenseMatrix copy()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.