hephysics.matrix
Class BasicMatrix
- java.lang.Object
-
- hephysics.matrix.BasicMatrix
-
- All Implemented Interfaces:
- Matrix, MutableMatrix, java.io.Serializable
- Direct Known Subclasses:
- Hep3Matrix
public class BasicMatrix extends java.lang.Object implements MutableMatrix, java.io.Serializable
A very simple matrix implementation- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description BasicMatrix(double[][] data)
Creates a new instance of BasicMatrixBasicMatrix(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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double
det()
double
e(int row, int column)
Returns the value of the given elementint
getNColumns()
Returns the number of columnsint
getNRows()
Returns the number of rowsvoid
invert()
Invert this matrix (into itself)void
setElement(int row, int column, double value)
Set the given element of the matrixjava.lang.String
toString()
void
transpose()
Tranpose this matrix (into itself)
-
-
-
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
-
getNColumns
public int getNColumns()
Description copied from interface:Matrix
Returns the number of columns- Specified by:
getNColumns
in interfaceMatrix
-
e
public double e(int row, int column)
Description copied from interface:Matrix
Returns the value of the given element
-
det
public double det()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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 interfaceMutableMatrix
-
invert
public void invert() throws MatrixOp.IndeterminateMatrixException
Description copied from interface:MutableMatrix
Invert this matrix (into itself)- Specified by:
invert
in interfaceMutableMatrix
- 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 interfaceMutableMatrix
- See Also:
MatrixOp.transposed(Matrix,MutableMatrix)
-
-
DMelt 3.0 © DataMelt by jWork.ORG