public interface Matrix
Interface of matrix including dense matrix and sparse matrix
Copyright: Copyright (c) 2005
Company: IST, Drexel University
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the matrix and release all resources.
|
int |
columns() |
double |
cosine(int rowA,
int rowB)
This method treats each row a vector and return the cosine similarity of two rows.
|
int |
getBaseColumn()
The index of the first column in a matrix is zero.
|
int |
getBaseRow()
The index of the first row in a matrix is zero.
|
int |
getCellDataLength()
For double matrix, this method returns 8; for integer matrix, it returns 4.
|
int |
getCooccurrenceCount(int rowA,
int rowB)
If two cells in the same column have non-zero scores, they will be counted as co-occurred.
|
double |
getDouble(int row,
int column)
Return the score stored in the specified cell.
|
int |
getInt(int row,
int column)
Return the score stored in the specified cell.
|
Matrix |
getTranspose()
If one never calls niether the method of setTranspose nor the method of transpose, it returns null.
|
int |
rows() |
void |
setTranspose(Matrix matrix)
Manually set the transposed matrix.
|
Matrix |
transpose()
if one has set the transposed matrix by calling the method setTranspose, this method simply return that transposed matrix.
|
int rows()
int columns()
int getBaseRow()
int getBaseColumn()
int getCellDataLength()
int getInt(int row,
int column)
row - the row index of the cellcolumn - the column index of the celldouble getDouble(int row,
int column)
row - the row index of the cellcolumn - the column index of the celldouble cosine(int rowA,
int rowB)
rowA - the row index of the first vectorrowB - the row index of the second vectorint getCooccurrenceCount(int rowA,
int rowB)
rowA - the index of the first rowrowB - the index of the second rowMatrix transpose()
Matrix getTranspose()
void setTranspose(Matrix matrix)
matrix - the transpose matrix of the current matrix.void close()
Copyright © 2018 JULIE Lab, Germany. All rights reserved.