|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.decisiondeck.xmcda_oo.utils.matrix.FloatMatrixRestrictedView
public class FloatMatrixRestrictedView
| Constructor Summary | |
|---|---|
FloatMatrixRestrictedView(IRdFloatMatrix<Alternative,Criterion> delegate,
Predicate<Alternative> restrictToAlternatives,
Predicate<Criterion> restrictToCriteria)
|
|
FloatMatrixRestrictedView(IRdFloatMatrix<Alternative,Criterion> delegate,
Predicate<Alternative> restrictToAlternatives,
Set<Criterion> restrictToCriteria)
|
|
| Method Summary | |
|---|---|
boolean |
approxEquals(IRdFloatMatrix<Alternative,Criterion> 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. |
Set<Criterion> |
getColumns()
Returns a read-only view of the columns existing in this matrix. |
Double |
getEntry(Alternative row,
Criterion column)
Returns the value at the position composed by the given row and column, or null if there is none. |
Set<Alternative> |
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.decisiondeck.xmcda_oo.utils.matrix.IRdFloatMatrix |
|---|
equals |
| Constructor Detail |
|---|
public FloatMatrixRestrictedView(IRdFloatMatrix<Alternative,Criterion> delegate,
Predicate<Alternative> restrictToAlternatives,
Set<Criterion> restrictToCriteria)
delegate - not null.restrictToAlternatives - null for no restriction.restrictToCriteria - null for no restriction. If empty, this view will always be empty as it will never
contain any criterion.
public FloatMatrixRestrictedView(IRdFloatMatrix<Alternative,Criterion> delegate,
Predicate<Alternative> restrictToAlternatives,
Predicate<Criterion> restrictToCriteria)
delegate - not null.restrictToAlternatives - null for no restriction.restrictToCriteria - null for no restriction.| Method Detail |
|---|
public boolean approxEquals(IRdFloatMatrix<Alternative,Criterion> m2,
double imprecision)
IRdFloatMatrix
approxEquals in interface IRdFloatMatrix<Alternative,Criterion>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 Set<Criterion> getColumns()
IRdFloatMatrix
getColumns in interface IRdFloatMatrix<Alternative,Criterion>null. Empty iff this matrix is empty.
public Double getEntry(Alternative row,
Criterion column)
IRdFloatMatrixnull if there is none.
getEntry in interface IRdFloatMatrix<Alternative,Criterion>row - not null.column - not null.
null.public Set<Alternative> getRows()
IRdFloatMatrix
getRows in interface IRdFloatMatrix<Alternative,Criterion>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<Alternative,Criterion>public 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<Alternative,Criterion>true iff this matrix is complete.public boolean isEmpty()
IRdFloatMatrix
isEmpty in interface IRdFloatMatrix<Alternative,Criterion>true iff the matrix contains no value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||