org.decisiondeck.xmcda_oo.utils.matrix
Interface IFloatMatrix<RowType,ColumnType>

Type Parameters:
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.
All Superinterfaces:
IRdFloatMatrix<RowType,ColumnType>
All Known Subinterfaces:
IEvaluations
All Known Implementing Classes:
EvaluationMatrix, EvaluationsByRows, FloatMatrix

public interface IFloatMatrix<RowType,ColumnType>
extends IRdFloatMatrix<RowType,ColumnType>

A matrix which is able to store double values at a set of positions, each position being represented by a row and a column. Note that special double values such as Double.POSITIVE_INFINITY are accepted.

Vocabulary note: an entry can be a value or can be null, a value is a double number.


Method Summary
 IZeroToOneMatrix<RowType,ColumnType> getAsFuzzy()
          Produces a fuzzy matrix view of this matrix.
 boolean isFuzzy()
          Tells whether this matrix may be converted to a fuzzy matrix.
 void put(RowType row, ColumnType column, double value)
          Puts a value in this matrix at the position specified by the given row and column.
 Double remove(RowType row, ColumnType column)
          Remove the value in this matrix at the position specified by the given row and column.
 
Methods inherited from interface org.decisiondeck.xmcda_oo.utils.matrix.IRdFloatMatrix
approxEquals, equals, getColumns, getEntry, getRows, getValueCount, isComplete, isEmpty
 

Method Detail

put

void put(RowType row,
         ColumnType column,
         double value)
Puts a value in this matrix at the position specified by the given row and column.

Parameters:
row - not null.
column - not null.
value - any double.

remove

Double remove(RowType row,
              ColumnType column)
Remove the value in this matrix at the position specified by the given row and column. If there was no value at that position, this method has no effect.

Parameters:
row - not null.
column - not null.
Returns:
the value which was previously at the given position. Returns null iff there was no value at that position (and, hence, nothing was removed).

getAsFuzzy

IZeroToOneMatrix<RowType,ColumnType> getAsFuzzy()
Produces a fuzzy matrix view of this matrix. Note that if that call returns a fuzzy view, this matrix may not be used any more afterwards to put non-fuzzy values as this would break the underlying fuzzy matrix's contract.

Returns:
a fuzzy matrix containing the same values as this matrix, and reflecting changes in this matrix, or null if this matrix cannot be converted to a fuzzy matrix.

isFuzzy

boolean isFuzzy()
Tells whether this matrix may be converted to a fuzzy matrix.

Returns:
true iff all the values contained in this matrix are between zero and one.


Copyright © 2011. All Rights Reserved.