edu.iu.iv.core.datamodels.matrixmodel
Interface DoubleMatrixModel

All Known Implementing Classes:
DenseDoubleMatrixModel, SparseDoubleMatrixModel

public interface DoubleMatrixModel

This interface provides methods for accessing and modifying matrices holding double floating point primitive type elements. Note that the interface does not force any sort of bounds checking. This is an implementation detail and it is encouraged that implementations of DoubleMatrixModel do the required bounds- checking. Certain high-performance code does not do any bounds-checking in order to speed up the computation process and this is allowed, but discouraged.

Version:
0.1
Author:
TeamIVC

Method Summary
 double get(int row, int col)
          Gets the element at the specified row and column.
 java.lang.String getColumnLabel(int col)
          Gets the label for the specified column.
 int getNumberOfColumns()
           
 int getNumberOfRows()
           
 java.lang.String getRowLabel(int row)
          Gets the label for the specified row.
 void set(int row, int col, double value)
          Sets the value of the element at the specified row and column.
 void setColumnLabel(int col, java.lang.String text)
          Sets the label at the specified column to the specified text.
 void setRowLabel(int row, java.lang.String text)
          Sets the label of the specified row to the specified text.
 

Method Detail

get

public double get(int row,
                  int col)
Gets the element at the specified row and column.

Parameters:
row - The row number of this element.
col - The column number of this element.
Returns:
The value at matrix(row, column)

set

public void set(int row,
                int col,
                double value)
Sets the value of the element at the specified row and column.

Parameters:
row - The row number.
col - The column number.
value - The value of the element.

setColumnLabel

public void setColumnLabel(int col,
                           java.lang.String text)
Sets the label at the specified column to the specified text.

Parameters:
col - The column number.
text - The text of the label.

getColumnLabel

public java.lang.String getColumnLabel(int col)
Gets the label for the specified column.

Parameters:
col - The column number.
Returns:
The text of the label.

setRowLabel

public void setRowLabel(int row,
                        java.lang.String text)
Sets the label of the specified row to the specified text.

Parameters:
row - The row number.
text - The text of the label.

getRowLabel

public java.lang.String getRowLabel(int row)
Gets the label for the specified row.

Parameters:
row - The row number.
Returns:
The text of the label.

getNumberOfRows

public int getNumberOfRows()
Returns:
The number of rows in the matrix.

getNumberOfColumns

public int getNumberOfColumns()
Returns:
The number of columns in the matrix.