| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcynosurex.math.Matrix
public class Matrix
| Field Summary | |
|---|---|
protected  int | 
columns
 | 
protected  double[][] | 
matrix
 | 
protected  int | 
rows
 | 
| Fields inherited from interface cynosurex.internal.CommonInterface | 
|---|
copyright, copyrightYears, notice, program, version | 
| Fields inherited from interface cynosurex.internal.AuthorCommon | 
|---|
author, copyrightSymbol, noticeMsg, rights | 
| Fields inherited from interface cynosurex.internal.CompanyCommon | 
|---|
company, email, website | 
| Constructor Summary | |
|---|---|
Matrix(double[][] initValue)
Create a new matrix based on the specified array.  | 
|
Matrix(int rows,
       int columns)
Create a new matrix based on the specified rows and columns.  | 
|
Matrix(int rows,
       int columns,
       double initValue)
Create a new matrix based on the specified rows, columns, and initial value.  | 
|
| Method Summary | |
|---|---|
static Matrix | 
addition(Matrix a,
         Matrix b)
This static method adds two matrices and produces the result in the thrid matrix.  | 
 double[][] | 
getArray()
This method returns the matrix as a double array.  | 
 int | 
getColumns()
This method returns the number of columns in the matrix.  | 
 java.awt.Dimension | 
getDimension()
This method returns the Dimension of the matrix.  | 
 int | 
getRows()
This method returns the number of rows in the matrix.  | 
 Matrix | 
getTranspose()
This method returns the transpose the current matrix.  | 
 double | 
getValueAt(int row,
           int column)
This method returns one of the value in the matrix.  | 
static Matrix | 
identityMatrix(int dimension)
This static method creates an identity matrix based on the specified dimension.  | 
static Matrix | 
multiplication(Matrix a,
               Matrix b)
This static method multiplies two matrices and produces the result in the third matrix.  | 
 void | 
setValueAt(double value,
           int row,
           int column)
This method sets one of the value in the matrix.  | 
 java.lang.String | 
toString()
Overrides the super class method.  | 
 void | 
Transpose()
This method transposes the current matrix.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected int rows
protected int columns
protected double[][] matrix
| Constructor Detail | 
|---|
public Matrix(int rows,
              int columns)
rows - number of rows in the matrixcolumns - number of columns in the matrix
public Matrix(int rows,
              int columns,
              double initValue)
rows - number of rows in the matrixcolumns - number of columns in the matrixinitValue - initial value of the matrixpublic Matrix(double[][] initValue)
initValue - array containing the initial values| Method Detail | 
|---|
public static Matrix addition(Matrix a,
                              Matrix b)
a - the first matrixb - the second matrix
public static Matrix multiplication(Matrix a,
                                    Matrix b)
a - the first matrixb - the second matrixpublic static final Matrix identityMatrix(int dimension)
dimension - dimension of the matrix to producepublic java.awt.Dimension getDimension()
public int getColumns()
public int getRows()
public double getValueAt(int row,
                         int column)
row - specifies the row of the valuecolumn - specifies the column of the value
public void setValueAt(double value,
                       int row,
                       int column)
value - value to place in the matrixrow - specifies the row of the valuecolumn - specifies the column of the valuepublic double[][] getArray()
public void Transpose()
public Matrix getTranspose()
public java.lang.String toString()
toString in class java.lang.Object
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||