|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfomat.vectorspace.IMatrix
public class IMatrix
IMatrix represents the relations between two IObjectSet:s. The IMatrixCell class represents the elements of this IMatrix. This is implemented considering sparse matrices. The IMatrixCells are stored in a DoubleHashMap and are the non zero matrix elements.
Constructor Summary | |
---|---|
IMatrix(java.lang.String columnLabel,
java.lang.String rowLabel)
|
Method Summary | |
---|---|
void |
addCell(int ri,
int ci,
double w)
Add the value of a column in a row |
boolean |
addCell(int ri,
int ci,
float weight)
Add the value of a column in a row |
void |
addDocument(java.lang.String d,
int di)
adds a Document as a Row to the matrix |
void |
addWord(java.lang.String w,
int ws)
adds a Word as Column to the matrix |
java.util.Vector |
getAllCells()
Returns the DoubleHashMap containing all non zero elements of the IMatrix. |
IMatrixCell |
getCell(IObject row,
IObject col)
Returns the IMatrixCell for the IObject "row" in the "row" IObjectSet and the IObject "col" in the "column" IObjectSet |
DoubleHashMap |
getCellMap()
Returns the DoubleHashMap containing all non zero elements of the IMatrix. |
java.util.HashSet |
getColumnIMatrixCellsForRowObject(IObject rowObject)
|
IObjectSet |
getColumnIObjectSet()
Returns the "column" IObjectSet. |
IObjectGrouping |
getCurrentColumnGrouping()
Returns the current IObjectGrouping for the columns. |
IObjectGrouping |
getCurrentRowGrouping()
Returns the current IObjectGrouping for the rows. |
java.awt.Dimension |
getCurrentSize()
Returns a Dimension with x-size as the number of "columns" and y-size as the number of "rows" of the IMatrix. |
java.util.HashSet |
getRowIMatrixCellsForColumnObject(IObject colObject)
|
IObjectSet |
getRowIObjectSet()
Returns the "row" IObjectSet. |
java.awt.Dimension |
getSize()
Returns a Dimension with x-size as the number of "columns" and y-size as the number of "rows" of the IMatrix. |
void |
invertMatrix()
|
void |
purgeMatrixToCurrentGroupings()
Removes all IObjects that's not in the current IObjectGroupings from the sets and all their IObjectGroupings. |
void |
removeAllCells()
Revmove all IMatrixCell from the IMatrix. |
void |
removeCell(IMatrixCell mc)
Removes a IMatrixCell from the IMatrix. |
void |
resort()
Resorts the IObjectSet:s "rows" and "cols" according to their current IObjectGroupings. |
void |
saveIMatrix(java.io.File file)
|
void |
saveIObjectGroupingFile(IObjectGrouping grouping,
java.io.File file)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IMatrix(java.lang.String columnLabel, java.lang.String rowLabel)
Method Detail |
---|
public void addWord(java.lang.String w, int ws)
w
- The Word as a stringws
- A unique identifier of the wordpublic void addDocument(java.lang.String d, int di)
d
- The source of the documentdi
- A unique identifier of the documentpublic boolean addCell(int ri, int ci, float weight)
ri
- The unique identifier of the rowci
- The unique identifier of the columnweight
- The value of the column in the row
public void addCell(int ri, int ci, double w)
ri
- The unique identifier of the rowci
- The unique identifier of the columnw
- The weight of the column in the rowpublic void purgeMatrixToCurrentGroupings()
public void invertMatrix()
public IObjectSet getRowIObjectSet()
public IObjectSet getColumnIObjectSet()
public IObjectGrouping getCurrentRowGrouping()
public IObjectGrouping getCurrentColumnGrouping()
public DoubleHashMap getCellMap()
public java.util.Vector getAllCells()
public IMatrixCell getCell(IObject row, IObject col)
public void removeCell(IMatrixCell mc)
mc
- An IMatrixCellpublic void removeAllCells()
public java.awt.Dimension getSize()
public java.awt.Dimension getCurrentSize()
public void resort()
public java.util.HashSet getRowIMatrixCellsForColumnObject(IObject colObject)
public java.util.HashSet getColumnIMatrixCellsForRowObject(IObject rowObject)
public void saveIMatrix(java.io.File file)
public void saveIObjectGroupingFile(IObjectGrouping grouping, java.io.File file)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |