hep.physics.matrix
Class BasicMatrix

java.lang.Object
  extended by hep.physics.matrix.BasicMatrix
All Implemented Interfaces:
Matrix, MutableMatrix, java.io.Serializable

public class BasicMatrix
extends java.lang.Object
implements MutableMatrix, java.io.Serializable

A very simple matrix implementation

Author:
tonyj
See Also:
Serialized Form

Constructor Summary
BasicMatrix(double[][] data)
          Creates a new instance of BasicMatrix
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
 java.lang.String toString()
           
 void transpose()
          Tranpose this matrix (into itself)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicMatrix

public BasicMatrix(int nRows,
                   int nCols)

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 java.lang.String toString()
Overrides:
toString in class java.lang.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)


Copyright © 2000-2010 FreeHEP. All Rights Reserved.