org.astrogrid.matrix
Interface Matrix

All Superinterfaces:
java.lang.Iterable<no.uib.cipr.matrix.MatrixEntry>, no.uib.cipr.matrix.Matrix

public interface Matrix
extends no.uib.cipr.matrix.Matrix


Nested Class Summary
 
Nested classes/interfaces inherited from interface no.uib.cipr.matrix.Matrix
no.uib.cipr.matrix.Matrix.Norm
 
Method Summary
 Matrix add(double a)
           
 AGDenseMatrix append(double d)
          append double value.
 AGDenseMatrix append(Matrix m)
          Append the matrix as new rows onto the existing matrix.
 AGDenseMatrix append(no.uib.cipr.matrix.Vector m)
          Append the matrix as new rows onto the existing matrix.
 double asScalar()
           
 no.uib.cipr.matrix.Vector asVector()
          return a copy of the data as a vector.
 no.uib.cipr.matrix.Vector asVector(int istart)
          return a copy of the data as a vector.
 no.uib.cipr.matrix.Vector asVector(int istart, int idend)
          return a copy of the data as a vector.
 Matrix delCol(int k)
          Delete column k from the matrix.
 Matrix delRow(int k)
           
 double det()
          Return the determinant of the matrix.
 Matrix divide(Matrix b, Matrix c)
          C= A/B where the division is elementwise.
 Matrix inv()
          Computes the inverse of the matrix.
 Matrix ones()
           
 Matrix pow(double i)
          Return a matrix with elements raised to the power.
 Matrix reshape(int irow, int icol)
          Reshapes the matrix to have the new size.
 Matrix setColumn(int idx, Matrix v)
          Set a complete column in the matrix to the value given.
 Matrix setColumn(int idx, no.uib.cipr.matrix.Vector v)
          Set a complete column in the matrix to the value given.
 Matrix setRow(int k, Matrix m)
           
 Matrix setRow(int k, no.uib.cipr.matrix.Vector v)
           
 Matrix slice(int rowstart, int rowend, int colstart, int colend)
          Deprecated. too complex - use slicev(int, boolean) or sliceCol(int, int) instead.
 no.uib.cipr.matrix.Vector sliceCol(int col)
          Returns a new Matrix consisting of only the specified column.
 Matrix sliceCol(int colstart, int ncols)
          Returns a new Matrix consisting of only the specified columns.
 no.uib.cipr.matrix.Vector sliceRow(int idx)
          Returns a Vector of the row.
 Matrix sliceRowM(int k)
          Returns a matrix consisting of only the row.
 no.uib.cipr.matrix.Vector slicev(int idx, boolean dorow)
          Deprecated. use sliceRow or SliceCol instead.
 no.uib.cipr.matrix.Vector sum(int dim)
          Return the sum of a matrix along a dimension.
 double trace()
          Produce the trace of the matrix.
 
Methods inherited from interface no.uib.cipr.matrix.Matrix
add, add, add, copy, get, isSquare, mult, mult, mult, mult, multAdd, multAdd, multAdd, multAdd, norm, numColumns, numRows, rank1, rank1, rank1, rank1, rank1, rank1, rank2, rank2, rank2, rank2, scale, set, set, set, solve, solve, transABmult, transABmult, transABmultAdd, transABmultAdd, transAmult, transAmult, transAmultAdd, transAmultAdd, transBmult, transBmult, transBmultAdd, transBmultAdd, transMult, transMult, transMultAdd, transMultAdd, transpose, transpose, transRank1, transRank1, transRank2, transRank2, transSolve, transSolve, zero
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

slice

Matrix slice(int rowstart,
             int rowend,
             int colstart,
             int colend)
Deprecated. too complex - use slicev(int, boolean) or sliceCol(int, int) instead.

slice an array - indices are 0 based. Creates a new array storage - original data is untouched.

Parameters:
rowstart -
rowend -
colstart -
colend -
Returns:

sum

no.uib.cipr.matrix.Vector sum(int dim)
Return the sum of a matrix along a dimension.

Parameters:
dim - the dimension along which to sum 1=sum the columns 2 = sum the rows
Returns:

pow

Matrix pow(double i)
Return a matrix with elements raised to the power.

Parameters:
i -
Returns:

slicev

no.uib.cipr.matrix.Vector slicev(int idx,
                                 boolean dorow)
Deprecated. use sliceRow or SliceCol instead.

Return a single column or row of the matrix

Parameters:
idx - the 0 based index of the row or column to return;
dorow - if true return a row - if false return a column.
Returns:

sliceRow

no.uib.cipr.matrix.Vector sliceRow(int idx)
Returns a Vector of the row. matlab syntax mat(idx, :)

Parameters:
idx -
Returns:

sliceRowM

Matrix sliceRowM(int k)
Returns a matrix consisting of only the row. matlab syntax mat(idx, :).

Parameters:
k -
Returns:

sliceCol

Matrix sliceCol(int colstart,
                int ncols)
Returns a new Matrix consisting of only the specified columns. This is equivalent to the Matlab syntax mat(:, colstart:colstart+ncols).

Parameters:
colstart -
ncols -
Returns:

sliceCol

no.uib.cipr.matrix.Vector sliceCol(int col)
Returns a new Matrix consisting of only the specified column. This is equivalent to the Matlab syntax mat(:, col).

Parameters:
colstart -
ncols -
Returns:

ones

Matrix ones()
Returns:

reshape

Matrix reshape(int irow,
               int icol)
Reshapes the matrix to have the new size. Elements are copied columnwise.

Parameters:
irow -
Returns:

asVector

no.uib.cipr.matrix.Vector asVector()
return a copy of the data as a vector. The storage is assumed to be column major. This is similar to the A(:) 'linear' addressing in matlab.

Returns:

asVector

no.uib.cipr.matrix.Vector asVector(int istart,
                                   int idend)
return a copy of the data as a vector. The storage is assumed to be column major. This is similar to the A(:) 'linear' addressing in matlab.

Returns:

asVector

no.uib.cipr.matrix.Vector asVector(int istart)
return a copy of the data as a vector. The storage is assumed to be column major. a matrix treating as one large columnwise array. - Indices are 0 based.

Parameters:
istart -
Returns:

det

double det()
Return the determinant of the matrix.

Returns:

trace

double trace()
Produce the trace of the matrix.

Returns:

inv

Matrix inv()
Computes the inverse of the matrix. B = A^-1

Returns:

divide

Matrix divide(Matrix b,
              Matrix c)
C= A/B where the division is elementwise.

Parameters:
b -
c -
Returns:

add

Matrix add(double a)

setColumn

Matrix setColumn(int idx,
                 no.uib.cipr.matrix.Vector v)
Set a complete column in the matrix to the value given.

Parameters:
idx -
v -
Returns:

setColumn

Matrix setColumn(int idx,
                 Matrix v)
Set a complete column in the matrix to the value given. Note that the matrix must have only one column.

Parameters:
idx -
v -
Returns:

append

AGDenseMatrix append(Matrix m)
Append the matrix as new rows onto the existing matrix.

Parameters:
m -
Returns:

append

AGDenseMatrix append(no.uib.cipr.matrix.Vector m)
Append the matrix as new rows onto the existing matrix.

Parameters:
m -
Returns:

asScalar

double asScalar()

append

AGDenseMatrix append(double d)
append double value.

Parameters:
d -

setRow

Matrix setRow(int k,
              Matrix m)

setRow

Matrix setRow(int k,
              no.uib.cipr.matrix.Vector v)

delCol

Matrix delCol(int k)
Delete column k from the matrix.

Parameters:
k -
Returns:

delRow

Matrix delRow(int k)


Copyright © 2008-2010 AstroGrid. All Rights Reserved.