| Constructor and Description |
|---|
DoubleMatrix(double[][] data)
Create matrix from a rectangular array of data
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
eq(DoubleMatrix mat)
Test equality with another double matrix using == for doubles.
|
boolean |
equals(java.lang.Object obj)
Uses the Double.equals() rather than == for compatibility with hashcode.
|
double |
getDEle(int i,
int j)
Get the element as a double value.
|
Dimensions |
getDimensions()
Gets the dimensions of the Vector or Matrix
|
java.lang.Double |
getEle(int i,
int j)
Gets an element of a matrix
|
int |
getNCols()
The number of columns
|
int |
getNRows()
The number of rows
|
int |
hashCode() |
static DoubleMatrix |
newInstance(java.lang.Double[][] in)
Create a matrix from an array of Doubles
|
static DoubleMatrix |
newInstance(DoubleVector[] rows)
Create a matrix from an array of Doubles
|
void |
setEle(int row,
int col,
double val)
Sets an element
|
void |
setEle(int row,
int col,
java.lang.Object val)
Set an element of a matrix
|
java.lang.Object[][] |
toArray(java.lang.Object[][] mat)
Copies the data to an array
|
double[][] |
toArrayMat()
Return a cloned copy of the data
|
java.lang.String |
toString() |
public DoubleMatrix(double[][] data)
data - must be rectangularpublic static DoubleMatrix newInstance(java.lang.Double[][] in)
in - rectangular array of Doublespublic static DoubleMatrix newInstance(DoubleVector[] rows)
rows - array of DoubleVector's, one per row, must all be the same lengthpublic java.lang.Double getEle(int i,
int j)
MatrixIpublic double getDEle(int i,
int j)
i - rowj - colpublic int getNRows()
MatrixIpublic int getNCols()
MatrixIpublic Dimensions getDimensions()
MatrixIgetDimensions in interface MatrixIpublic double[][] toArrayMat()
public java.lang.String toString()
toString in class java.lang.Objectpublic void setEle(int row,
int col,
double val)
row - the rowcol - the columnval - value to setpublic void setEle(int row,
int col,
java.lang.Object val)
throws EvaluationException
MatrixIsetEle in interface MatrixIval - value to setEvaluationExceptionpublic java.lang.Object[][] toArray(java.lang.Object[][] mat)
throws EvaluationException
MatrixItoArray in interface MatrixIEvaluationException - if mat is not a matrix of the correct sizepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
eq(DoubleMatrix)
for comparison using ==.equals in class java.lang.Objectpublic boolean eq(DoubleMatrix mat)
mat - Copyright © 2018 Singular Systems http://www.singularsys.com/jep