ch.javasoft.smx.impl
Class SubDoubleMatrix

java.lang.Object
  extended by ch.javasoft.smx.impl.AbstractDoubleMatrix
      extended by ch.javasoft.smx.impl.SubDoubleMatrix
All Implemented Interfaces:
DoubleMatrix, MatrixBase<Double>, ReadableDoubleMatrix<Double>, ReadableMatrix<Double>, WritableBigIntegerMatrix<Double>, WritableBigIntegerRationalMatrix<Double>, WritableDoubleMatrix<Double>, WritableIntMatrix<Double>, WritableIntRationalMatrix<Double>, WritableLongMatrix<Double>, WritableLongRationalMatrix<Double>, WritableMatrix<Double>, Cloneable

public class SubDoubleMatrix
extends AbstractDoubleMatrix

The SubDoubleMatrix TODO type javadoc for SubDoubleMatrix


Constructor Summary
SubDoubleMatrix(DoubleMatrix base, boolean selectAllRows, boolean selectAllColumns)
           
 
Method Summary
 void addRowToOtherRow(int srcRow, double srcFactor, int dstRow, double dstFactor)
           
 SubDoubleMatrix clone()
           
 int getColumnCount()
           
 double getDoubleValueAt(int row, int col)
           
 int getMappedRow(int row)
           
 int getRowCount()
           
 int[] getRowMapping()
           
 int getUnmappedRow(int rowInBaseMatrix)
           
 void multiplyRow(int row, double factor)
           
 SubDoubleMatrix newInstance(Double[][] data, boolean rowsInDim1)
           
 SubDoubleMatrix newInstance(int rows, int cols)
           
 void selectAllColumns()
           
 void selectAllRows()
           
 int selectColumn(int colInBaseMatrix)
          Selects a given column from the underlying base matrix and appends it to the end of the columnset of this SubDoubleMatrix
 int selectColumn(int fromColInBaseMatrix, int toColInBaseMatrix)
           
 int selectRow(int rowInBaseMatrix)
          Selects a given row from the underlying base matrix and appends it to the end of the rowset of this SubDoubleMatrix
 int selectRows(int fromRowInBaseMatrix, int toRowInBaseMatrix)
          Selects a range of rows from the underlying base matrix and appends them to the end of the rowset of this SubDoubleMatrix
 void setValueAt(int row, int col, double value)
           
 void swapRows(int rowA, int rowB)
           
 void switchSelectedColumn(int col, int colInBaseMatrix)
           
 void switchSelectedRow(int row, int rowInBaseMatrix)
           
 SubDoubleMatrix transpose()
           
 void unselectAllColumns()
           
 void unselectAllRows()
           
 void unselectColumn(int col)
           
 void unselectColumns(int fromCol, int toCol)
           
 void unselectRow(int row)
           
 void unselectRows(int fromRow, int toRow)
           
 
Methods inherited from class ch.javasoft.smx.impl.AbstractDoubleMatrix
add, add, add, add, add, add, add, addRowToOtherRow, addRowToOtherRow, addRowToOtherRow, addRowToOtherRow, addRowToOtherRow, addRowToOtherRow, equals, equals, equals, getDoubleColumn, getDoubleColumn, getDoubleColumns, getDoubleColumns, getDoubleRow, getDoubleRow, getDoubleRows, getDoubleRows, getMatrixOperations, getNumberOperations, getNumberRows, getNumberRows, getNumberValueAt, getSignumAt, hashCode, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiplyRow, multiplyRow, multiplyRow, multiplyRow, multiplyRow, multiplyRow, negate, setValueAt, setValueAt, setValueAt, setValueAt, setValueAt, setValueAt, setValueAt, setValueAt, subDoubleMatrix, swapColumns, toArray, toArray, toDoubleArray, toDoubleMatrix, toMultilineString, toMultilineString, toReadableMatrix, toString, toString, toString, toWritableMatrix, writeTo, writeTo, writeTo, writeTo, writeTo, writeToMultiline, writeToMultiline, writeToMultiline, writeToMultiline
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubDoubleMatrix

public SubDoubleMatrix(DoubleMatrix base,
                       boolean selectAllRows,
                       boolean selectAllColumns)
Method Detail

selectRow

public int selectRow(int rowInBaseMatrix)
Selects a given row from the underlying base matrix and appends it to the end of the rowset of this SubDoubleMatrix

Parameters:
rowInBaseMatrix - The row index in the underlying base matrix
Returns:
The index of the added row in this SubDoubleMatrix

selectRows

public int selectRows(int fromRowInBaseMatrix,
                      int toRowInBaseMatrix)
Selects a range of rows from the underlying base matrix and appends them to the end of the rowset of this SubDoubleMatrix

Parameters:
fromRowInBaseMatrix - The start row index in the underlying base matrix (inclusive)
toRowInBaseMatrix - The end row index in the underlying base matrix (exclusive)
Returns:
The index in this SubDoubleMatrix of the first row added. The next rows are appended, the last row is at position getColumnCount() - 1.

selectAllRows

public void selectAllRows()

switchSelectedRow

public void switchSelectedRow(int row,
                              int rowInBaseMatrix)

getMappedRow

public int getMappedRow(int row)

getUnmappedRow

public int getUnmappedRow(int rowInBaseMatrix)

getRowMapping

public int[] getRowMapping()

selectColumn

public int selectColumn(int colInBaseMatrix)
Selects a given column from the underlying base matrix and appends it to the end of the columnset of this SubDoubleMatrix

Parameters:
colInBaseMatrix - The column index in the underlying base matrix
Returns:
The index of the added column in this SubDoubleMatrix

selectColumn

public int selectColumn(int fromColInBaseMatrix,
                        int toColInBaseMatrix)

selectAllColumns

public void selectAllColumns()

switchSelectedColumn

public void switchSelectedColumn(int col,
                                 int colInBaseMatrix)

unselectRow

public void unselectRow(int row)

unselectRows

public void unselectRows(int fromRow,
                         int toRow)

unselectAllRows

public void unselectAllRows()

unselectColumn

public void unselectColumn(int col)

unselectColumns

public void unselectColumns(int fromCol,
                            int toCol)

unselectAllColumns

public void unselectAllColumns()

getDoubleValueAt

public double getDoubleValueAt(int row,
                               int col)

setValueAt

public void setValueAt(int row,
                       int col,
                       double value)

addRowToOtherRow

public void addRowToOtherRow(int srcRow,
                             double srcFactor,
                             int dstRow,
                             double dstFactor)
Specified by:
addRowToOtherRow in interface WritableDoubleMatrix<Double>
Overrides:
addRowToOtherRow in class AbstractDoubleMatrix

multiplyRow

public void multiplyRow(int row,
                        double factor)
Specified by:
multiplyRow in interface WritableDoubleMatrix<Double>
Overrides:
multiplyRow in class AbstractDoubleMatrix

clone

public SubDoubleMatrix clone()
Specified by:
clone in interface DoubleMatrix
Specified by:
clone in interface MatrixBase<Double>
Specified by:
clone in interface ReadableMatrix<Double>
Specified by:
clone in interface WritableMatrix<Double>
Specified by:
clone in class AbstractDoubleMatrix

newInstance

public SubDoubleMatrix newInstance(int rows,
                                   int cols)

newInstance

public SubDoubleMatrix newInstance(Double[][] data,
                                   boolean rowsInDim1)

getRowCount

public int getRowCount()

getColumnCount

public int getColumnCount()

swapRows

public void swapRows(int rowA,
                     int rowB)

transpose

public SubDoubleMatrix transpose()
Specified by:
transpose in interface DoubleMatrix
Specified by:
transpose in interface MatrixBase<Double>
Specified by:
transpose in interface ReadableMatrix<Double>
Specified by:
transpose in interface WritableMatrix<Double>
Specified by:
transpose in class AbstractDoubleMatrix