|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jds.collection.SparseMatrix
SparseMatrix - sparse two dimensional indexed collection; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.
Collection
, Serialized FormConstructor Summary | |
SparseMatrix()
initialize a newly created sparse matrix |
|
SparseMatrix(java.lang.Object d)
initialize a newly created sparse matrix |
Method Summary | |
java.lang.Object |
elementAt(int i,
int j)
find element at give location |
int |
numberColumns()
determine number of columns in matrix |
int |
numberRows()
determine number of rows in matrix |
void |
setElementAt(java.lang.Object v,
int i,
int j)
change element at given location |
void |
setSize(int rows,
int columns)
set bounds in number of rows and columns |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SparseMatrix()
public SparseMatrix(java.lang.Object d)
d
- default value to use for uninitialized fieldsMethod Detail |
public void setSize(int rows, int columns)
rows
- number of rows in matrixcolumns
- number of columns in matrixpublic int numberRows()
public int numberColumns()
public java.lang.Object elementAt(int i, int j)
i
- index for row dimension of matrixj
- index for column dimension of matrixpublic void setElementAt(java.lang.Object v, int i, int j)
v
- new value for positioni
- index for row dimension of matrixj
- index for column dimension of matrix
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |