|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
RowType - the type of objects used to designate the row part of a position.ColumnType - the type of objects used to designate the column part of a position.public interface IRdFloatMatrix<RowType,ColumnType>
A matrix which is able to retrieve double values at a set of positions, each position being represented by a row and a column entries.
Vocabulary note: an entry can be a value or can be null, a value is a float between zero and one.
Note that, although this interface is read-only, the underlying object may be mutable.
| Method Summary | |
|---|---|
boolean |
approxEquals(IRdFloatMatrix<RowType,ColumnType> m2,
double imprecision)
Two matrix are "approximately equal" to a given degree of precision iff they contain values for the same mappings and the value they contain for each mapping are not more different than the given allowed imprecision. |
boolean |
equals(Object obj)
Two matrix are equal iff they are the same type and contain the same values at the same positions. |
Set<ColumnType> |
getColumns()
Returns a read-only view of the columns existing in this matrix. |
Double |
getEntry(RowType row,
ColumnType column)
Returns the value at the position composed by the given row and column, or null if there is none. |
Set<RowType> |
getRows()
Returns a view of the rows existing in this matrix. |
int |
getValueCount()
Gets the number of values in this matrix. |
boolean |
isComplete()
A matrix is complete iff it contains a value for every possible position (row, column) where row and column are rows and columns existing in this matrix (i.e. corresponding to at least one value). |
boolean |
isEmpty()
Checks whether this matrix contains no value. |
| Method Detail |
|---|
boolean approxEquals(IRdFloatMatrix<RowType,ColumnType> m2,
double imprecision)
m2 - the matrix to which to compare this object for approximate equality. If null, this method
returns false.imprecision - the maximal imprecision allowed.
true iff the given matrix is approximately equal to this one.boolean equals(Object obj)
approxEquals(IRdFloatMatrix, double) if this can be a problem.
equals in class Objectobj - the object to compare. May be null.
true iff the given object is equal to this matrix.Object.equals(java.lang.Object)Set<ColumnType> getColumns()
null. Empty iff this matrix is empty.
Double getEntry(RowType row,
ColumnType column)
null if there is none.
row - not null.column - not null.
null.Set<RowType> getRows()
null. Empty iff this matrix is empty.int getValueCount()
Gets the number of values in this matrix.
Note that the word "size" is not used here because the size of the matrix could be understood as meaning its row count times its column count, which is the same as its value count only if it is complete.
boolean isComplete()
A matrix is complete iff it contains a value for every possible position (row, column) where row and column are rows and columns existing in this matrix (i.e. corresponding to at least one value). An empty matrix is complete.
true iff this matrix is complete.boolean isEmpty()
true iff the matrix contains no value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||