util
Class MatrixUtilities

java.lang.Object
  extended by util.MatrixUtilities

public class MatrixUtilities
extends java.lang.Object

Utilities for removing entries from vectors, rows and columns from matrices.

Author:
dgorur

Field Summary
static cern.colt.matrix.DoubleFactory1D F1D
           
static cern.colt.matrix.DoubleFactory2D F2D
           
 
Constructor Summary
MatrixUtilities()
           
 
Method Summary
static cern.colt.matrix.DoubleMatrix2D removeColumn(cern.colt.matrix.DoubleMatrix2D X, int index)
          Removes the indexed column from the given matrix.
static cern.colt.matrix.DoubleMatrix1D removeEntry(cern.colt.matrix.DoubleMatrix1D x, int index)
          Removes the indexed entry from the given vector.
static cern.colt.matrix.DoubleMatrix2D removeRow(cern.colt.matrix.DoubleMatrix2D X, int index)
          Removes the indexed row from the given matrix.
static cern.colt.matrix.DoubleMatrix2D removeRowAndColumn(cern.colt.matrix.DoubleMatrix2D X, int row, int col)
          Removes the indexed row and column from the given matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

F1D

public static final cern.colt.matrix.DoubleFactory1D F1D

F2D

public static final cern.colt.matrix.DoubleFactory2D F2D
Constructor Detail

MatrixUtilities

public MatrixUtilities()
Method Detail

removeColumn

public static cern.colt.matrix.DoubleMatrix2D removeColumn(cern.colt.matrix.DoubleMatrix2D X,
                                                           int index)
Removes the indexed column from the given matrix.

Parameters:
X - the given matrix.
index - the column to be removed.
Returns:
the column-removed matrix.

removeEntry

public static cern.colt.matrix.DoubleMatrix1D removeEntry(cern.colt.matrix.DoubleMatrix1D x,
                                                          int index)
Removes the indexed entry from the given vector.

Parameters:
x - the given vector.
index - the entry to be removed.
Returns:
the truncated vector.

removeRow

public static cern.colt.matrix.DoubleMatrix2D removeRow(cern.colt.matrix.DoubleMatrix2D X,
                                                        int index)
Removes the indexed row from the given matrix.

Parameters:
X - the given matrix.
index - the row to be removed.
Returns:
the row-removed matrix.

removeRowAndColumn

public static cern.colt.matrix.DoubleMatrix2D removeRowAndColumn(cern.colt.matrix.DoubleMatrix2D X,
                                                                 int row,
                                                                 int col)
Removes the indexed row and column from the given matrix.

Parameters:
X - the given matrix.
row - the row to be removed.
col - the column to be removed.
Returns:
the row- and column-removed matrix.