org.decisiondeck.jmcda.services.utils
Class CutRel<RowType,ColumnType>

java.lang.Object
  extended by org.decisiondeck.jmcda.services.utils.CutRel<RowType,ColumnType>
Type Parameters:
RowType - the row type.
ColumnType - the column type.

public class CutRel<RowType,ColumnType>
extends Object

Cuts a matrix at some specified threshold and transforms it into a binary matrix.


Constructor Summary
CutRel()
           
 
Method Summary
 IZeroToOneMatrix<RowType,ColumnType> cut(IRdFloatMatrix<RowType,ColumnType> toCut, double threshold)
          Cuts the given matrix at the specified threshold and returns a binary matrix containing the same number of values as the input one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CutRel

public CutRel()
Method Detail

cut

public IZeroToOneMatrix<RowType,ColumnType> cut(IRdFloatMatrix<RowType,ColumnType> toCut,
                                                double threshold)
Cuts the given matrix at the specified threshold and returns a binary matrix containing the same number of values as the input one. Any value in the input matrix greater than or equal to the threshold will transform to a one in the output matrix. Other values in the input matrix are transformed to a zero in the output matrix.

Parameters:
toCut - not null, may be incomplete.
threshold - may be infinite, not NAN.
Returns:
not null, may be empty.


Copyright © 2011. All Rights Reserved.