Class JamaMatrix
java.lang.Object
gov.nih.mipav.model.structures.jama.JamaMatrix
Wrapper around Jama package, @see src/Jama/
Provides access to features unique to Jama lib,
otherwise use WildMagic Matrix3f, Matrix4f and GMatrix classes.
- Author:
- helser
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionJamaMatrix(double[][] A) JamaMatrix(int m, int n) Initial value set to 0.0 for all elementsJamaMatrix(int m, int n, double s) privateJamaMatrix(Jama.Matrix B) Convert results from Jama lib -
Method Summary
Modifier and TypeMethodDescriptiondoubleget(int i, int j) Get a single element.double[][]Copy the internal two-dimensional array.voidset(int i, int j, double s) Set a single element.solve(JamaMatrix B)
-
Field Details
-
matrix
private Jama.Matrix matrix
-
-
Constructor Details
-
JamaMatrix
public JamaMatrix(int m, int n) Initial value set to 0.0 for all elements- Parameters:
m- number of columnsn- number of rows
-
JamaMatrix
public JamaMatrix(int m, int n, double s) - Parameters:
m- number of columnsn- number of rowss- initial value for all elements.
-
JamaMatrix
public JamaMatrix(double[][] A) - Parameters:
A- rectangular 2D matrix with data, stores a reference.
-
JamaMatrix
private JamaMatrix(Jama.Matrix B) Convert results from Jama lib- Parameters:
B- internal data
-
-
Method Details
-
solve
-
get
public double get(int i, int j) Get a single element.- Parameters:
i- Row index.j- Column index.- Returns:
- A(i,j)
- Throws:
ArrayIndexOutOfBoundsException
-
set
public void set(int i, int j, double s) Set a single element.- Parameters:
i- Row index.j- Column index.s- A(i,j).- Throws:
ArrayIndexOutOfBoundsException
-
getArrayCopy
public double[][] getArrayCopy()Copy the internal two-dimensional array.- Returns:
- Two-dimensional array copy of matrix elements.
-