Representing a 100K X 100K matrix in Java

后端 未结 9 2042
名媛妹妹
名媛妹妹 2020-12-30 13:45

How can I store a 100K X 100K matrix in Java?

I can\'t do that with a normal array declaration as it is throwing a java.lang.OutofMemoryError.

9条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 14:02

    The Colt library has a sparse matrix implementation for Java.

    You could alternatively use Berkeley DB as your storage engine.

    Now if your machine has enough actual RAM (at least 9 gigabytes free), you can increase the heap size in the Java command-line.

提交回复
热议问题