public class SparseMatrix
{
static SparseObjectMatrix2D matrix = new SparseObjectMatrix2D(1000000, 1000000);
public static void main(String[] args)
{
matrix.set(1, 2, 3.0);
}
}
这是我得到的错误:
java.lang.ExceptionInInitializerError Caused by:
java.lang.IllegalArgumentException: matrix too large at
cern.colt.matrix.impl.AbstractMatrix2D.setUp(Unknown Source) at
cern.colt.matrix.impl.AbstractMatrix2D.setUp(Unknown Source) at
cern.colt.matrix.impl.SparseObjectMatrix2D.<init>(Unknown Source) at
cern.colt.matrix.impl.SparseObjectMatrix2D.<init>(Unknown Source) at
SparseMatrix.<clinit>(SparseMatrix.java:18) Exception in thread "main"