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 doubledet()doublee(int row, int column)Returns the value of the given elementintgetNColumns()Returns the number of columnsintgetNRows()Returns the number of rowsvoidinvert()Invert this matrix (into itself)voidsetElement(int row, int column, double value)Set the given element of the matrixjava.lang.StringtoString()voidtranspose()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:MatrixReturns the number of rows
-
getNColumns
public int getNColumns()
Description copied from interface:MatrixReturns the number of columns- Specified by:
getNColumnsin interfaceMatrix
-
e
public double e(int row, int column)Description copied from interface:MatrixReturns the value of the given element
-
det
public double det()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setElement
public void setElement(int row, int column, double value)Description copied from interface:MutableMatrixSet the given element of the matrix- Specified by:
setElementin interfaceMutableMatrix
-
invert
public void invert() throws MatrixOp.IndeterminateMatrixExceptionDescription copied from interface:MutableMatrixInvert this matrix (into itself)- Specified by:
invertin interfaceMutableMatrix- Throws:
MatrixOp.IndeterminateMatrixException- See Also:
MatrixOp.inverse(Matrix,MutableMatrix)
-
transpose
public void transpose()
Description copied from interface:MutableMatrixTranpose this matrix (into itself)- Specified by:
transposein interfaceMutableMatrix- See Also:
MatrixOp.transposed(Matrix,MutableMatrix)
-
-
DMelt 3.0 © DataMelt by jWork.ORG