|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for Matrices, dense or sparse. Only requires functions necessary for clustering. Not a general linear algebra matrix interface
Method Summary | |
int |
cardinality()
Returns the number of cells having non-zero values; ignores tolerance. |
Object |
clone()
|
Iterator |
columnIterator()
iterates through all Array columns in the Matrix |
int |
columns()
returns number of columns in matrix |
Iterator |
entryIterator()
iterator: returns iterator over all Entries in matrix. |
Set |
entrySet()
returns set of all Entries in matrix |
double |
get(int i,
int j)
|
Array |
getColumn(int index)
returns column with index index |
Matrix |
normalizeColumns(Metric metric)
returns Matrix whose columns are normalized to 1 does not change receiver |
int |
rows()
returns number of rows in matrix |
void |
set(int i,
int j,
double value)
|
void |
setColumn(int index,
Array column)
sets column with index index = column |
String |
toDenseString()
Returns a dense string representation of matrix. |
String |
toMatlabSparseString()
returns sparse string representation of matrix, in Matlab-readable format, ensuring that the first matrix entry is [1,1,value] rather than [0,0,value] i.e. |
String |
toSparseString()
returns sparse string representation of matrix num_rows num_columns num_nonzero_entries row column value row column value ... |
String |
toString()
returns bracket-delimited entrySet String representation of Matrix [[[row,column,value], [row,column,value]], [[row,column,value]...] |
Method Detail |
public Iterator entryIterator()
public Iterator columnIterator()
public String toString()
toString
in class Object
public String toSparseString()
public String toMatlabSparseString()
public String toDenseString()
value value value value value value value value value value value value value value value value
public Array getColumn(int index)
index
public void setColumn(int index, Array column)
index = column
public Set entrySet()
public int cardinality()
public void set(int i, int j, double value)
public double get(int i, int j)
public int rows()
public int columns()
public Matrix normalizeColumns(Metric metric)
public Object clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |