|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.decisiondeck.xmcda_oo.utils.matrix.OneMinusInverseMatrix<PosType>
PosType - the type of object referencing the row and the column part of the positions.public class OneMinusInverseMatrix<PosType>
A fuzzy matrix based on an other fuzzy matrix (called 'base' matrix). When queried about it value for a given (row, column) position, this matrix replies by computing one minus the value at the position (column, row) (called inverted position) of the 'base' matrix.
This matrix contains a value at a given position if and only if the base matrix contains a value at the inverted position.
This kind of matrix is implemented only for the case where the positions are specified using the same type of objects for rows and columns (so that they can be exchanged by the user) because it is probably only useful in that case.
Note that this matrix's rows are the base matrix's columns and this matrix's columns are the base matrix's rows. (This is a consequence of this matrix's definition.)
| Constructor Summary | |
|---|---|
OneMinusInverseMatrix(IRdZeroToOneMatrix<PosType,PosType> base)
Sets this object to use the given matrix as base. |
|
| Method Summary | |
|---|---|
boolean |
approxEquals(IRdFloatMatrix<PosType,PosType> 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<PosType> |
getColumns()
Returns a read-only view of the columns existing in this matrix. |
Double |
getEntry(PosType row,
PosType column)
Returns the value at the position specified by the given row and column, of null if there is none. |
Set<PosType> |
getRows()
Returns a view of the rows existing in this matrix. |
int |
getValueCount()
Gets the number of values in this matrix. |
int |
hashCode()
|
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. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OneMinusInverseMatrix(IRdZeroToOneMatrix<PosType,PosType> base)
base - not null.| Method Detail |
|---|
public boolean approxEquals(IRdFloatMatrix<PosType,PosType> m2,
double imprecision)
IRdFloatMatrix
approxEquals in interface IRdFloatMatrix<PosType,PosType>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.public boolean equals(Object obj)
IRdFloatMatrixIRdFloatMatrix.approxEquals(IRdFloatMatrix, double) if this can be a problem.
equals in interface IRdFloatMatrix<PosType,PosType>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)public Set<PosType> getColumns()
IRdFloatMatrix
getColumns in interface IRdFloatMatrix<PosType,PosType>null. Empty iff this matrix is empty.
public Double getEntry(PosType row,
PosType column)
IRdZeroToOneMatrixnull if there is none.
getEntry in interface IRdFloatMatrix<PosType,PosType>getEntry in interface IRdZeroToOneMatrix<PosType,PosType>row - not null.column - not null.
null.public Set<PosType> getRows()
IRdFloatMatrix
getRows in interface IRdFloatMatrix<PosType,PosType>null. Empty iff this matrix is empty.public int getValueCount()
IRdFloatMatrixGets 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.
getValueCount in interface IRdFloatMatrix<PosType,PosType>public int hashCode()
hashCode in class Objectpublic boolean isComplete()
IRdFloatMatrixA 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.
isComplete in interface IRdFloatMatrix<PosType,PosType>true iff this matrix is complete.public boolean isEmpty()
IRdFloatMatrix
isEmpty in interface IRdFloatMatrix<PosType,PosType>true iff the matrix contains no value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||