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

EigenValue and EigenVector Java Implementation

I'm implementing metric learning algorithm, I want to reduce the dimension of the data. I am using Java and libraries (Jama) to implement, and PCA to reduce the dimension. When I used the eig from Jama library to get eigenvalues, it takes a lots of…
saha
  • 93
  • 1
  • 5
  • 11
0
votes
1 answer

Writing jama matrix to file

I want to write a matrix to a file in java by using jama library.However, only a empty file is produced. I am using the code below. What can be wrong? PrintWriter writer = null; try { writer = new PrintWriter("deneme.txt", "UTF-8"); …
emrahsamdan
  • 203
  • 4
  • 13
0
votes
3 answers

Correlation matrix for eigenfaces - Java

I am following the tutorial at http://jeremykun.com/2011/07/27/eigenfaces/. I am trying to implement this solution in Java using the Jama Linear Algebra package. I am stuck on calculating the covariance matrix. I calculated all the…
sailor
  • 59
  • 1
  • 8
0
votes
4 answers

Matrix operations in Java

I looked for this everywhere, but I am wrong somewhere. In my Java program, I created few 2D Arrays. Now, I need to form new 2D arrays with previous, like, inverse, transpose, multiplying , LEFT DIVISION and maybe even more. Some of them (simple) I…
Aleksandar
  • 1,163
  • 22
  • 41
0
votes
1 answer

Dependencies for Jama in Maven

Where can i find jama dependencies for maven. I checked in MVN Repo but could nt find. I am using Jama-1.0.2.jar. Any suggesions.
user2922060
0
votes
1 answer

Jama.Matrix ClassNotFoundException

I am trying to use Jama package in my code in Linux. In my Main class, I am trying to use Matrix class. Here is my Main class: import Jama.*; class Main { public static void main(String[] args) { Matrix A = new Matrix(3,5); } } I am…
sefakilic
  • 1,180
  • 1
  • 13
  • 13
0
votes
1 answer

hashmap containing same values

Hi i use a hashMap containing integers as keys and list of matrix as values, here is the code import java.util.ArrayList; import java.util.HashMap; import java.util.List; import Jama.Matrix; public class KFold { public static…
user2133558
  • 524
  • 2
  • 10
  • 29
0
votes
1 answer

Calculate rotation between 2 sets of Vectors

I have 2 sets of 3D Vectors with N entries. I am trying to calculate the Rotation matrix which best aligns the first set with the second set. I believe I can use the java library JAMA to accomplish this with Singular Value Decomposition or…
user66332
  • 189
  • 2
  • 13
0
votes
1 answer

Find Bounding Box of a 3d point cloud using PCA

I'm trying to find a bounding box of a 3d point cloud using PCA. I'm using the JAMA "Java Matrix Package" in order to perform SVD. I'm sampling 1000 out of my point cloud and perform SVD: Matrix pointsMatrix = new…
YogevSitton
  • 10,068
  • 11
  • 62
  • 95
0
votes
1 answer

How to replace single row in Matrix using Jama ?

I trying to replace a single row using Jama . I tried it by using setMatrix like this - double[][] myArray = { { 1, 1, 1, 1 }, { 1, 1, 1, 1 }, { 1, 1, 1, 1 }, { 1, 1, 1, 1 } }; // all the matrix '1' Matrix myMatrix = new…
URL87
  • 10,667
  • 35
  • 107
  • 174
0
votes
1 answer

Jama How to Shuffle Matrix?

I am using Jama for my Matrix manipulations at Java. However I could not see an adequate documentation for it. How can I shuffle a matrix at Jama? Also is there something like: Matrix(:,end) to get only last column as like at Matlab?
kamaci
  • 72,915
  • 69
  • 228
  • 366
0
votes
1 answer

representing matrixes as an array using Jama

I'm using Jama to calculate eigenvectors and eigenvalues, and it works quit well. The problem is that sometimes extracting the columns from the matrix into an array results in wrong values. Have someone came accross it? How shall I deal with it? I'm…
Maoritzio
  • 1,142
  • 2
  • 13
  • 31
0
votes
0 answers

Transposing a matrix before doing a SVD with Jama

So I'm using Jama (Java matrix library) to compute the SVD of a matrix A. The problem is that Jama only works if A (mxn) is a matrix where m >=n and I'm using one where m I've read this can be solved by doing A' (transpose). So that if you have…
Jared Joke
  • 1,226
  • 2
  • 18
  • 29
0
votes
2 answers

Issues in Java Matrices Libraries

I'm working in a project that need to get SVD (Single Values Decomposition) for a matrix of 74000 X 640 dimension. I tried those three libraries: Jama, efficient Java Matrix library (EJML), and OjAlgo.I choose these three based on the Java Matrix…
sakurami
  • 343
  • 3
  • 18
0
votes
3 answers

participal Eigenvalues Java (JAMA)

I just ported my code from MATLAB to Java, and I need the eigen decomposition of a matrix, specifically I only need the first k values not the full decomposition. However in JAMA, the eigen-decomposition class computes the full eigen decomposition.…
lukyja
  • 1