All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface CH.epfl.lcvm.mccc.Matrix

public interface Matrix
A general Matrix interface.


Method Index

 o add(Matrix)
Add the given matrix to the current matrix
 o copy()
So, it appears that clone doesn't really support polymorphic copying correctly (in java 1.1) so until it does we will use this...
 o copyColumns(int, int)
Slice the matrix columnise and return a copy of the specified columns
 o copyRows(int, int)
Slice the matrix rowise and return a copy of the specified rows
 o determinant()
Compute the determinant of the matrix
 o getColumns()
Get the number of columns
 o getElement(int, int)
Returns the element at the specified row and column
 o getRows()
Get the number of rows
 o infinityNorm()
Get the infinity norm of the matrix
 o multiply(double)
Multiply the current matrix by the given scalar
 o multiply(Matrix)
Post multiply the current matrix by the given matrix
 o nullSpaceBasis()
Return a matrix whose columns are a basis of the null space of the matrix.
 o oneNorm()
Get the one norm of the matrix
 o setElement(int, int, double)
Sets the element at the specified row and column
 o solve(Matrix)
Solve the linear system AX=B and return X.
 o subtract(Matrix)
Subtract the given matrix from the current matrix
 o toArray()
Returns the native array representation of the matrix
 o transpose()
Transpose the current matrix

Methods

 o getElement
 public abstract double getElement(int row,
                                   int column)
Returns the element at the specified row and column

Parameters:
row - The row of the desired element
column - The column of the desired element
Returns:
the element at the specified coordinates.
 o setElement
 public abstract void setElement(int row,
                                 int column,
                                 double value)
Sets the element at the specified row and column

Parameters:
row - The row of the desired element
column - The column of the desired element
value - The value to place into the array
 o add
 public abstract void add(Matrix B)
Add the given matrix to the current matrix

Parameters:
B - The matrix to be added
 o subtract
 public abstract void subtract(Matrix B)
Subtract the given matrix from the current matrix

Parameters:
B - The matrix to be added
 o multiply
 public abstract void multiply(Matrix B)
Post multiply the current matrix by the given matrix

Parameters:
B - The matrix to be multiplied by
 o multiply
 public abstract void multiply(double x)
Multiply the current matrix by the given scalar

Parameters:
x - The scalar to be multiplied by
 o transpose
 public abstract void transpose()
Transpose the current matrix

 o getRows
 public abstract int getRows()
Get the number of rows

Returns:
The number of rows
 o getColumns
 public abstract int getColumns()
Get the number of columns

Returns:
The number of columns
 o infinityNorm
 public abstract double infinityNorm()
Get the infinity norm of the matrix

Returns:
The infinity norm of the matrix
 o oneNorm
 public abstract double oneNorm()
Get the one norm of the matrix

Returns:
The one norm of the matrix
 o copy
 public abstract Matrix copy()
So, it appears that clone doesn't really support polymorphic copying correctly (in java 1.1) so until it does we will use this...

Returns:
A copy of the matrix
 o copyRows
 public abstract Matrix copyRows(int start,
                                 int end)
Slice the matrix rowise and return a copy of the specified rows

Parameters:
start - The starting row
end - The ending row
Returns:
A copy of the matrix with just the given rows (inclusive)
 o copyColumns
 public abstract Matrix copyColumns(int start,
                                    int end)
Slice the matrix columnise and return a copy of the specified columns

Parameters:
start - The starting column
end - The ending column
Returns:
A copy of the matrix with just the given columns (inclusive)
 o solve
 public abstract Matrix solve(Matrix B) throws SolverException
Solve the linear system AX=B and return X. The method is up to the derived class. The solution matrix X has as many columns as B.

Returns:
The solution X
Throws: SolverException
The exception thrown when the solver fails
 o nullSpaceBasis
 public abstract Matrix nullSpaceBasis() throws MCCCException
Return a matrix whose columns are a basis of the null space of the matrix. Only guarenteed to work if the matrix is Nx(N+M) and has rank N.

Returns:
The basis of the null space.
Throws: MCCCException
The exception thrown when the method fails
 o determinant
 public abstract double determinant() throws SolverException
Compute the determinant of the matrix

Returns:
The determinant of the matrix
Throws: SolverException
The exception thrown when the solver fails
 o toArray
 public abstract double[][] toArray()
Returns the native array representation of the matrix

Returns:
A double[][] representation of the matrix

All Packages  Class Hierarchy  This Package  Previous  Next  Index