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
2 answers

Jama API - GET item with tag at the same time

I need to fetch items from JAMA API, and I do not get the Tag value with the data. I tried to call GET/{item}/{id} API and then I also need to execute GET/{tags}/{id}/{item} to discover item tag, which takes too much time for multiple items. Is…
0
votes
1 answer

Jama REST Api - Injecting a where clause to GET

I'm using the REST API of Jama, detailed here: https://dev.jamasoftware.com/rest#operation_getItems Using this allows me to get a JSON object of all the items in a given project. However what is returned is limited to just 20 results, to get all the…
Peter
  • 1
  • 3
0
votes
4 answers

How to print non symmetric value while using for loop in Java

I want to implement a matrix using for loop. To create the matrix I used Jama Matrix Package. Here is my code import Jama.Matrix; public class Matrixnonsym { public static void main(String args[]) { Matrix Mytest=new Matrix(5,5); …
Saswati
  • 192
  • 8
0
votes
0 answers

Value allocation in a matrix in java

I want to write a java code which based upon the Matrix.I am using jama matrix. The code is like that: import Jama.Matrix; public class Landmarkassist { public static void main(String args[]){ double [] time1st …
Encipher
  • 1,370
  • 1
  • 14
  • 31
0
votes
2 answers

Jama Matrix printwriter error

I am using JAMA matrix in my project. I need to write down a Jama matrix in text file. For that I write down this code. package Xdata; import Jama.Matrix; import java.io.File; import java.io.FileNotFoundException; import…
Saswati
  • 192
  • 8
0
votes
0 answers

Generate Word document with updated TOC using Velocity template

I am currently working on a Velocity template for exporting data from the JAMA platform. I am required to follow an specific document format. This format includes a table of contents that currently is correctly created in the document. The issue is…
0
votes
1 answer

taken input from hard disk file in a matrix in Java

import Jama.Matrix; public class T5 { public static void main(String args[]){ Matrix C=new Matrix(new double[][]{{1,0,0,},{0,1,0},{0,0,1}}); Scanner x; try { x=new Scanner(new File("D://out.txt")); for (int i = 0; i <…
Encipher
  • 1,370
  • 1
  • 14
  • 31
0
votes
1 answer

Integrate Jama library in Netbeans platform

I would like to integrate the Jama library into Netbeans (not just a single project). However, I get the message "package Jama does not exist." I have done the following: I downloaded Jama's jar file. Then I went to Tools, Libraries, pressed the…
Code Now
  • 11
  • 3
0
votes
0 answers

How to compute in Jama x for Ax = x

I want to calculate in Jama solution of equation Ax = x (where A is a matrix and x is a vector). If it was Ax = b it would look just like this: Matrix x = A.solve(b); The only think I thought of was something like this (written in scala): var x =…
brzepkowski
  • 265
  • 1
  • 14
0
votes
1 answer

JAMA - How to combine vectors into a single matrix

I have a total of 4 column vectors which look like this: m1: m2: m3: m4: 0.26 -0.25 0.04 0.43 -0.20 -0.12 0.50 0.47 -0.27 0.79 -0.37 0.29 -0.06 -0.45 -0.71 0.44 -0.23 0.13 …
Krithika Raghavendran
  • 457
  • 3
  • 10
  • 25
0
votes
1 answer

Projection of a vector in processing using jama

I want to project A vector onto vector a and vector c, in Processing. In my sketch vector a is red and c is blue, I wanted c to be perpendicular to b but this is where i'm having alot of trouble. I'm using the JAMA library to try and make this…
0
votes
1 answer

Jama package, 4x4 linear equation solver

I'm trying to solve a 4x4 linear equation system (4 variables, 4 equations) using Jama. I have tried the following code, but it doesn't work. I would appreciate if someone can help me, using Jama or any other method. import Jama.Matrix; public…
Volazh
  • 126
  • 2
  • 13
0
votes
0 answers

java Math.random() keeps repeating the same values in a vector

I'm using the JAMA package to generate a bunch of random vectors. Although it generates a random number for the element in each row, it repeats this same vector 100 times. How do I generate different values for each vector? public static Matrix[]…
as1216
  • 1,194
  • 2
  • 8
  • 11
0
votes
0 answers

JAMA vector multiplication to get a single value

I want to multiply a column matrix and row matrix in JAMA and get a single value. But JAMA returns a matrix. here is the code double[] C= new double[]{1,2}; double[] D= new double[]{1,2}; double[][] x=matC.times(matD.transpose()).getArray(); for…
user77005
  • 1,769
  • 4
  • 18
  • 26
0
votes
0 answers

Jama SVD for calculating the Pseudoinverse

I'm unsure if I should post this on Stack overflow or Mathematics but I thought this question fits into algorithm studies so here I am. I've written an algorithm to calculate the pseudoinverse of a given matrix. I've done this using a naïve way…
Auberon
  • 665
  • 2
  • 7
  • 23