vkostyukov / la4j

Linear Algebra for Java
http://la4j.org
Apache License 2.0
371 stars 109 forks source link

java.lang.IndexOutOfBoundsException: Row '-32767' is invalid #308

Open aintHuman opened 4 years ago

aintHuman commented 4 years ago

I have a large sparse matrix, but I get issues:

java.lang.IndexOutOfBoundsException: Row '-32767' is invalid.

In the above case, it fails when trying to put data when row/column index exceeds 65535.

Is this by design?

Like an adjacency matrix on a 256x256px image would require a sparse matrix of 65536 x 65536, which is my precise user case in this situation.

CORRECTION: >> This error occurs when trying to add two sparse matrixes together:

(SparseMatrix)m1.add(m2);