oj! Algorithms – ojAlgo – is Open Source Java code to do mathematics, linear algebra and optimisation
Questions tagged [ojalgo]
74 questions
1
vote
1 answer
How do I test the equality of two MatrixStore in ojalgo up until a certain degree?
Does ojalgo provide an efficient way to test whether two matrix are equal ?
For instance, I would like to know if MatrixStore A is equal to MatrixStore B up until a certain tolerance level.
I could implement a naive test using a nested for loop…

YAMAZAKI1996
- 35
- 1
- 10
1
vote
1 answer
Oj Algo concurrency
I develop a program using ojAlgo library for computing matrix exponential. It includes eigen value decomposition. Does ojAlgo include multi-threaded algorithms ? For example is it possible to attach more than one thread to the decomposition task to…

Johann MARTINET
- 94
- 1
- 10
1
vote
0 answers
getEigenPair from the ojAlgo libraries throws ArrayIndexOutOfBoundsException
I am attempting to use the getEigenPair(int Index) function from the ojAlgo libraries however keep on getting an ArrayIndexOutOfBoundsException for index values greater than 0. The code is shown below:
ComplexDenseStore…

hermit
- 56
- 6
1
vote
1 answer
Display all possible solutions in ojAlgo
Question: Is it possible to adjust the above to produce all possible results instead of an optimized one.
Details: Given a data set of armor, I want to produce a set of combinations where my constraints are fulfilled.
Variable helm1 =…

OrhanC1
- 1,415
- 2
- 14
- 28
1
vote
1 answer
Do QR/SVD decomposition in ojalgo require as many rows as columns?
When doing QR or SVD decomposition on an m x n matrix A in ojalgo, I've hit a snag. My purpose is to find a basis for the column null space. If m >= n, things work fine. For instance, QR decomposition of the transpose A' of a 5 x 4 matrix A with…

prubin
- 366
- 2
- 14
1
vote
1 answer
Rank of a matrix in ojAlgo
I'm currently using the ojAlgo v45.1.0. I have a question regarding how to get the trace and the sum of a matrix. As I store a matrix in the class PrimitiveDenseStore, it is not feasible to see methods to compute the trace and the sum of the matrix.…

nhavt
- 349
- 2
- 10
1
vote
1 answer
Remove rows/columns from MatrixStore in OjAlgo
Is there any convenient and efficient way to remove rows (or columns) from SparseMatrix in ojAlgo? I was trying to retrieve RowView from my matrix and then copy rows that should remain element by element to new matrix but this is not very efficient…

Piotr Baniukiewicz
- 11
- 2
1
vote
1 answer
ojAlgo: slice or extract sub-matrix
In the java library ojAlgo, how can I slice a matrix or extract a sub-matrix from an existing one?
For example,
matrix A = [[1,2,3],[4,5,6],[7,8,9]].
I am looking for a method which looks like slice(a,b,c,d) where a, b are the start and end indexes…

JYY
- 205
- 2
- 9
1
vote
1 answer
Compute rolling mean with ojalgo
What is best way to compute rolling mean using ojalgo?
First SampleSet is adding every number as many times as windows size is.
Second the code intent is not evident.
I have:
final Array1D doubles =…

user482745
- 1,165
- 1
- 11
- 31
1
vote
0 answers
Oj-Algo - Matrix exponential
I resolve the following equation :
To solve it, I would like to use matrix exponential :
I thought about 3 ways to do it :
I could have missed it but Oj-Algo could have a simple way to compute exp(A) (I did not find it in MatrixStore javadoc)
I…

Johann MARTINET
- 94
- 1
- 10
1
vote
1 answer
How to get average of elements along columns or rows in an ojAlgo matrix?
Is there a way to compute the average of the primitive elements along the columns or rows of a matrix, such that we obtain vectors with the average values?
For example, let
A = [[1, 2, 3],[4, 5, 6]]
be a 2x3 matrix. The column-wise average would…

영민 카이 앤절
- 155
- 7
1
vote
1 answer
ojAlgo - Optimization issue with contiguous block logic?
I am using ojAlgo to work through a classroom scheduling problem I'm doing as an exercise. The source code can be found here on GitHub in the kotlin_solution folder:
https://github.com/thomasnield/optimized-scheduling-demo
Everything was going fine…

tmn
- 11,121
- 15
- 56
- 112
1
vote
2 answers
NPE in ojAlgo quadratic optimizer
I have a very short program which is supposed to find optimize a model using ojAlgo:
package dwarfs
import org.ojalgo.optimisation.ExpressionsBasedModel
import org.ojalgo.optimisation.Variable
import java.util.concurrent.atomic.AtomicInteger
val…

voddan
- 31,956
- 8
- 77
- 87
1
vote
1 answer
ojAlgo Change seed of random number generator
Can I somehow change the seed of the rngs of Uniform/Normal? Gonna be tough to make simulations that can be reproduced if you can not set the seed.
user2329125
1
vote
2 answers
ojAlgo - Expressing Variables as Boundaries in Optimization?
I've been playing around with ojAlgo and I've been pretty thrilled with it so far. I've worked through a few studies with it but I'm having trouble with this problem described in this article.
I'm using Kotlin instead of Java, but that shouldn't…

tmn
- 11,121
- 15
- 56
- 112