Class JamaMatrix
- java.lang.Object
-
- gov.nih.mipav.model.structures.jama.JamaMatrix
-
public class JamaMatrix extends java.lang.Object
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 Modifier and Type Field Description private Jama.Matrix
matrix
-
Constructor Summary
Constructors Modifier Constructor Description JamaMatrix(double[][] A)
JamaMatrix(int m, int n)
Initial value set to 0.0 for all elementsJamaMatrix(int m, int n, double s)
private
JamaMatrix(Jama.Matrix B)
Convert results from Jama lib
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
get(int i, int j)
Get a single element.double[][]
getArrayCopy()
Copy the internal two-dimensional array.void
set(int i, int j, double s)
Set a single element.JamaMatrix
solve(JamaMatrix B)
-
-
-
Constructor Detail
-
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 Detail
-
solve
public JamaMatrix solve(JamaMatrix B)
-
get
public double get(int i, int j)
Get a single element.- Parameters:
i
- Row index.j
- Column index.- Returns:
- A(i,j)
- Throws:
java.lang.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:
java.lang.ArrayIndexOutOfBoundsException
-
getArrayCopy
public double[][] getArrayCopy()
Copy the internal two-dimensional array.- Returns:
- Two-dimensional array copy of matrix elements.
-
-