public abstract class AbstractSparseMatrix<RK extends Comparable,CK extends Comparable,V extends Comparable> extends Object implements Cloneable
Constructor and Description |
---|
AbstractSparseMatrix() |
AbstractSparseMatrix(int inInitialRowCapacity,
int inInitialColCapacity) |
Modifier and Type | Method and Description |
---|---|
void |
addCol(CK inColKey) |
void |
addRow(RK inRowKey) |
protected void |
changeColKey(CK inOldKey,
CK inNewKey)
Changes the colkey inOldKey to inNewKey.
|
protected void |
changeRowKey(RK inOldKey,
RK inNewKey)
Changes the rowkey inOldKey to inNewKey.
|
void |
clearCol(CK inColKey) |
void |
clearRow(RK inRowKey) |
AbstractSparseMatrix<RK,CK,V> |
clone() |
protected Set<CK> |
colKeySet() |
protected boolean |
containsCol(CK inColKey) |
protected boolean |
containsRow(RK inRowKey) |
V |
get(RK inRowKey,
CK inColKey) |
MatrixCell<RK,CK,V> |
getCellWithSmallestValue() |
protected Map<RK,V> |
getCol(CK inColKey) |
MatrixCell<RK,CK,V> |
getNonIdentityCellWithSmallestValue() |
protected Map<CK,V> |
getRow(RK inRowKey) |
void |
put(RK inRowKey,
CK inColKey,
V inValue) |
void |
putCol(CK inColKey,
Map<RK,V> inRowMap) |
void |
putRow(RK inRowKey,
Map<CK,V> inColMap) |
V |
remove(RK inRowKey,
CK inColKey) |
protected void |
removeCol(CK inColKey) |
protected void |
removeCols(Set<CK> inColKeys) |
protected Map<CK,V> |
removeRow(RK inRowKey) |
protected Set<RK> |
rowKeySet() |
int |
size() |
String |
toString() |
void |
toString(OutputStream inStream) |
void |
trimToSize() |
public AbstractSparseMatrix()
public AbstractSparseMatrix(int inInitialRowCapacity, int inInitialColCapacity)
public void trimToSize()
public int size()
public MatrixCell<RK,CK,V> getCellWithSmallestValue()
public MatrixCell<RK,CK,V> getNonIdentityCellWithSmallestValue()
public void toString(OutputStream inStream) throws IOException
IOException
protected boolean containsRow(RK inRowKey)
protected void changeRowKey(RK inOldKey, RK inNewKey)
protected boolean containsCol(CK inColKey)
protected void removeCols(Set<CK> inColKeys)
protected void changeColKey(CK inOldKey, CK inNewKey)