Questions tagged [jama]

JAMA is a basic linear algebra package for Java. It provides user-level classes for constructing and manipulating real, dense matrices.

JAMA is a basic linear algebra package for Java, providing user-level classes for constructing and manipulating real, dense matrices. It is meant to provide sufficient functionality for routine problems, packaged in a way that is natural and understandable to non-experts. It is intended to serve as the standard matrix class for Java, and will be proposed as such to the Java Grande Forum and then to Sun.

Capabilities

JAMA is comprised of six Java classes: Matrix, CholeskyDecomposition, LUDecomposition, QRDecomposition, SingularValueDecomposition and EigenvalueDecomposition.

The Matrix class provides the fundamental operations of numerical linear algebra. Various constructors create matrices from two dimensional arrays of double precision floating point numbers. Various gets and sets provide access to submatrices and matrix elements. The basic arithmetic operations include matrix addition and multiplication, matrix norms and selected element-by-element array operations. A convenient matrix print method is also included.

Five fundamental matrix decompositions, which consist of pairs or triples of matrices, permutation vectors, and the like, produce results in five decomposition classes. These decompositions are accessed by the Matrix class to compute solutions of simultaneous linear equations, determinants, inverses and other matrix functions. The five decompositions are:

  • Cholesky Decomposition of symmetric, positive definite matrices
  • LU Decomposition (Gaussian elimination) of rectangular matrices
  • QR Decomposition of rectangular matrices
  • Eigenvalue Decomposition of both symmetric and nonsymmetric square matrices
  • Singular Value Decomposition of rectangular matrices
100 questions
0
votes
1 answer

Using Jama to calculate eigenvalues/eigenvectors?

I'm working on a small Java application that performs calculations on matrices. This is what I did for now to calculate the determinant and inverse of a square matrix. But I want to use the class Jama for the calculation of the eigenvalues ​​and…
whiteTIGER
  • 391
  • 1
  • 6
  • 19
0
votes
1 answer

java SVD JAMA wrong results

i have this array double a[][] = {{1,1,1}, {0,1,1} , { 1,0,0} ,{0,1,0},{1,0,0},{1,0,1},{1,1,1},{1,1,1},{1,0,1},{0,2,0},{0,1,1}}; and i want to get SVD (singular value decomprestion) , this is the code Matrix A = new Matrix(a); …
William Kinaan
  • 28,059
  • 20
  • 85
  • 118
0
votes
0 answers

Jama getS gives exception

I am applying SVD to a term - document matrix that i have already created.The matrix is a double array of the form : public static double[][] tdidf; tdidf = new double[listOfFiles.length][keywordList.size()]; But when i apple svd : …
Deepankar Bajpeyi
  • 5,661
  • 11
  • 44
  • 64
-1
votes
1 answer

convert spark.sql.DataFrame to Array[Array[Double]]

I'm working in spark and, to employ the Matrix class of the Jama library, I need to convert the content of a spark.sql.DataFrame to a 2D array, i.e., Array[Array[Double]]. While I've found quite several solutions on how to convert a single column of…
kilgoretrout
  • 158
  • 3
  • 14
-1
votes
1 answer

Printing out: no solution, multiple solution with Apache in java

I have this code which give solution to 4x4 linear equations. how can i print out when a linear equation have no solution or have multiples ones. instead of prints error ? public class OvaWork { void fourthEquationSolver() { …
Volazh
  • 126
  • 2
  • 13
-1
votes
1 answer

Using JAMA , printing the matrix it has questions marks in it

I have a 99 X 99 Matrix object that I populated from a 99X99 array of doubles. When I use the print method on the object I get several rows and columns of the ? character throughout the output. The program doesn't throw any exceptions. double…
nicomp
  • 4,344
  • 4
  • 27
  • 60
-1
votes
1 answer

operator - undefined for argument types double[]

I am working on a project which deals with large matrices of data. When i try to normalize it for my computation, I get the error operator - is undefined for argument types double[] my code is as follows: import Jama.*; public static Matrix…
Sandy.Arv
  • 607
  • 10
  • 34
-2
votes
1 answer

Inability to write import for Jama in java

Tried to implement the example but I got the error in the title http://math.nist.gov/javanumerics/jama/doc/Jama/Matrix.html I'm just wondering how do I write the import for it. I haven't found anything online. Thanks
-3
votes
1 answer

Exception in thread "main" java.lang.NoClassDefFoundError: main/Polyfit (wrong name: jamlab/Polyfit)

I am getting this error, with the compiler pointing to line 46: I've gone through the Polyfit class, but do not know how to correct this.
Job Collins
  • 138
  • 2
  • 11
-3
votes
2 answers

Java library eigenvalues float numbers

Hi I have the Jama librarry, but this libraray work only with Double numbers..and its very slow. for Android app ..and finally i dont need so high precision of eig decomp..so is there some JAva libaray with float num.....similar in syntax with jama?…
1 2 3 4 5 6
7