|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.stanford.nlp.linalg.AbstractMatrix
|
+--edu.stanford.nlp.linalg.ColtDenseMatrix
A Wrapper for a DenseDoubleMatrix2D
| Field Summary |
| Fields inherited from class edu.stanford.nlp.linalg.AbstractMatrix |
nc, nnz, nr |
| Constructor Summary | |
ColtDenseMatrix(cern.colt.matrix.DoubleMatrix2D mat)
|
|
ColtDenseMatrix(int num_rows,
int num_columns)
|
|
ColtDenseMatrix(String filename)
|
|
| Method Summary | |
void |
allocate(int num_rows,
int num_columns)
allocates memory for matrix of given size |
void |
allocate(int num_rows,
int num_columns,
int cardinality)
allocates memory for matrix of given size and cardinality |
int |
cardinality()
Returns the number of cells having non-zero values; ignores tolerance. |
Object |
clone()
|
int |
columns()
returns number of columns in matrix |
double |
get(int i,
int j)
Returns the matrix cell value at coordinate [row,column]. |
Array |
getColumn(int index)
returns number of columns in Matrix |
int |
rows()
returns number of rows in matrix |
void |
set(int i,
int j,
double value)
sets i,j th element of Matrix to value |
cern.colt.matrix.DoubleMatrix2D |
toDoubleMatrix2D()
|
| Methods inherited from class edu.stanford.nlp.linalg.AbstractMatrix |
columnIterator, entryIterator, entrySet, normalizeColumns, setColumn, tfidf, toDenseString, toMatlabSparseString, toSparseString, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ColtDenseMatrix(cern.colt.matrix.DoubleMatrix2D mat)
public ColtDenseMatrix(int num_rows,
int num_columns)
public ColtDenseMatrix(String filename)
throws FileNotFoundException,
IOException
| Method Detail |
public Array getColumn(int index)
public void set(int i,
int j,
double value)
value
public double get(int i,
int j)
IndexOutOfBoundsException - if column<0 || column>=columns() || row<0 || row>=rows()
public void allocate(int num_rows,
int num_columns)
allocate in class AbstractMatrix
public void allocate(int num_rows,
int num_columns,
int cardinality)
allocate in class AbstractMatrixpublic cern.colt.matrix.DoubleMatrix2D toDoubleMatrix2D()
public Object clone()
clone in interface Matrixclone in class AbstractMatrixpublic int columns()
Matrix
columns in interface Matrixcolumns in class AbstractMatrixpublic int rows()
Matrix
rows in interface Matrixrows in class AbstractMatrixpublic int cardinality()
Matrix
cardinality in interface Matrixcardinality in class AbstractMatrix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||