hephysics.matrix
Class BasicMatrix

java.lang.Object
  extended by hephysics.matrix.BasicMatrix
All Implemented Interfaces:
Matrix, MutableMatrix, Serializable
Direct Known Subclasses:
Hep3Matrix

public class BasicMatrix
extends Object
implements MutableMatrix, Serializable

A very simple matrix implementation

See Also:
Serialized Form

Constructor Summary
BasicMatrix(double[][] data)
          Creates a new instance of BasicMatrix
BasicMatrix(double e11, double e12, double e13, double e21, double e22, double e23, double e31, double e32, double e33)
           
BasicMatrix(int nRows, int nCols)
           
BasicMatrix(Matrix mIn)
           
 
Method Summary
 double det()
           
 double e(int row, int column)
          Returns the value of the given element
 int getNColumns()
          Returns the number of columns
 int getNRows()
          Returns the number of rows
 void invert()
          Invert this matrix (into itself)
 void setElement(int row, int column, double value)
          Set the given element of the matrix
 String toString()
           
 void transpose()
          Tranpose this matrix (into itself)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicMatrix

public BasicMatrix(int nRows,
                   int nCols)

BasicMatrix

public BasicMatrix(double e11,
                   double e12,
                   double e13,
                   double e21,
                   double e22,
                   double e23,
                   double e31,
                   double e32,
                   double e33)

BasicMatrix

public BasicMatrix(double[][] data)
Creates a new instance of BasicMatrix


BasicMatrix

public BasicMatrix(Matrix mIn)
Method Detail

getNRows

public int getNRows()
Description copied from interface: Matrix
Returns the number of rows

Specified by:
getNRows in interface Matrix

getNColumns

public int getNColumns()
Description copied from interface: Matrix
Returns the number of columns

Specified by:
getNColumns in interface Matrix

e

public double e(int row,
                int column)
Description copied from interface: Matrix
Returns the value of the given element

Specified by:
e in interface Matrix

det

public double det()

toString

public String toString()
Overrides:
toString in class Object

setElement

public void setElement(int row,
                       int column,
                       double value)
Description copied from interface: MutableMatrix
Set the given element of the matrix

Specified by:
setElement in interface MutableMatrix

invert

public void invert()
            throws MatrixOp.IndeterminateMatrixException
Description copied from interface: MutableMatrix
Invert this matrix (into itself)

Specified by:
invert in interface MutableMatrix
Throws:
MatrixOp.IndeterminateMatrixException
See Also:
MatrixOp.inverse(Matrix,MutableMatrix)

transpose

public void transpose()
Description copied from interface: MutableMatrix
Tranpose this matrix (into itself)

Specified by:
transpose in interface MutableMatrix
See Also:
MatrixOp.transposed(Matrix,MutableMatrix)


jHepWork 3.1 ©