Questions tagged [ejml]

Efficient Java Matrix Library is a linear algebra library for manipulating dense matrices

Efficient Java Matrix Library is a linear algebra library for manipulating dense matrices. Its design goals are:

  1. To be as computationally and memory efficient as possible for both small and large matrices
  2. to be accessible to both novices and experts.

These goals are accomplished by dynamically selecting the best algorithms to use at runtime and by designing a clean API. EJML is free, written in Java and has been released under an LGPL license.

https://code.google.com/p/efficient-java-matrix-library/

37 questions
1
vote
1 answer

ejml library use mult() to multiply a matrix by a scalar

For example, I want to multiply the scalar, Gamma, by the NxN matrix, A, and return the result as the NxN matrix, B, i.e. B = Gamma * A. First, I create DenseMatrix64F A, DenseMatrix64F B and double Gamma. Then, I would like to use the…
dulang10
  • 11
  • 2
1
vote
1 answer

Addition and division of doubles in Java

I use the EJML library in my project. I have written a method that calculates the variance of a SimpleMatrix row vector. At some point, I noticed that I get a variance > 0.0 when passing an equal-element vector to this method. I wrote this to…
suxumuxu
  • 121
  • 1
  • 1
  • 10
0
votes
1 answer

EMJL Exception in thread "main" java.lang.RuntimeException: Uncompilable code - cannot find symbol

I am trying to get EJML to work, especially to create matrices with random numbers. Creating regular a SimpleMatrix and DMatrixRMaj works well. But I keep getting java.lang.RuntimeException: Uncompilable code - cannot find symbol when using more…
0
votes
3 answers

How can I find the stop and start index for a Java vector?

I have a vector that looks like this: y = Columns 1 through 19: 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 Columns 20 through 38: 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 …
euraad
  • 2,467
  • 5
  • 30
  • 51
0
votes
1 answer

SimpleMatrix getMatrix().getData() issue

I am using EJML SimpleMatrix and I get the error The method getData() is undefined for the type Matrix when I try to return a double[] using the following code: double[] test = result.getMatrix().getData(); Any help is appreciated!
Jkim045
  • 45
  • 1
  • 6
0
votes
1 answer

Map matrix elements to {0, 1} values in EJML

I would like to turn a matrix of non-negative integers to a binary matrix. For example, given the following input matrix: 2 3 0 1 It should the following output matrix: 1 1 0 1 I think this is similar to a map operation, so pseudocode-wise this…
Gabor Szarnyas
  • 4,410
  • 3
  • 18
  • 42
0
votes
0 answers

Nullspace with ejml

I am using a library called ejml (Efficient Java Matrix Library) and I am having some trouble trying to calculate the dimension of the nullspace from a Matrix. First I tried with Singular Value Decomposition, but it gave me the error:…
Azazel
  • 183
  • 1
  • 1
  • 10
0
votes
1 answer

Limits for matrix size

I started using EJML for matrix calculations . I want to know the limits of data a matrix can hold. To do this I used following lines and I faced a very strange problem. DMatrixSparseCSC TesT = new DMatrixSparseCSC(175285 , 80201 ); for (int i1…
mohammed ahmed
  • 195
  • 1
  • 10
0
votes
1 answer

Issue with loading csv with ejml

I'm encountering some problems by using the MatrixIO.loadcsv() function in ejml. In fact, I need to load a file into a matrix; i'm following this official example: public static void main( String args[] ) { DMatrixRMaj A = new…
Lore
  • 1,286
  • 1
  • 22
  • 57
0
votes
1 answer

An ejml class for vector implementation

I'm trying to find a class similar to ejml's DMatrixRMaj but for vectors, for doing something like this double[][] probPoints; //initialize probPoints [...] provad = new DMatrixRMaj(probPoints); provad.print(); unfortunately, DMatrixRMaj doesn't…
Lore
  • 1,286
  • 1
  • 22
  • 57
0
votes
1 answer

Using EJML, is there a quick way to find mean of columns of a matrix?

Was looking for a function which returns a one diamensional SimpleMatrix giving the mean.
0
votes
1 answer

Instantiating a class does not work, constructor parameter is interface

i tried to create a instance of a class that implemented an interface, but the problem is that the constructor takes a parameter which is the interface itself. Information: I dont want to implement the interface, class or funcinality by myself,…
M.Mac
  • 699
  • 3
  • 14
0
votes
3 answers

How to use interface as parameter?

I am using EJML and I want to use the class LinearSolver_B64_to_D64, which has the constructor: LinearSolver_B64_to_D64(LinearSolver alg) with the interface LinearSolver and the class has already implemented the…
M.Mac
  • 699
  • 3
  • 14
0
votes
1 answer

Failed to build Scala program with gradle and java library dependencies

I have somewhat simple proplem (too hard for me though): I am trying to build a simple Scala test program, which has Java library dependencies, using gradle. My test program is following src/main/scala/test.scala import…
tele
  • 138
  • 10
0
votes
1 answer

LM algorithm using EJML

I try to use the example from EJML wiki where we use Levenberg Marquardt optimization source code here I compare it with this one .Net version in which we have the possibility to give the function model parameters. For example: a*x^2+b*x+c and we…
Valimo Ral
  • 381
  • 2
  • 15