out of memory error when creating large matrix
hello,
i have to create a matrix of 100000 cols and 10000 rows for store numeric values, 0 and 1, but when the program is executing , the error "outofmemory no stack trace available" appear.
縣ow can I resolve this? Is neccesary to modify the JVM?
Urgent !!!!!!!!!!!!!!!
Thanks in advance.
[319 byte] By [
SandraTTa] at [2007-10-2 12:43:24]

Which is 125 MiB of memory, minimum.
So you're going to have to do two things to make this work well. First, find out what a BitSet is and use it. Second, increase the amount of memory you're allocating to the JVM with the -Xmx256m option. Note that you can replace the "256" with whatever else you want, and it accepts other suffixes. Check the man pages to learn more ;~)
~Cheers
i have to create a matrix of 100000 cols and 10000 rows for store numeric values, 0 and 1I don't believe you.There's almost certainly a better way of achieving what you're trying to achieve... which is what, exactly?
Please use sparse matrices representation.Unless your matrix has very few zeros or 1's
It will be List of
pair of coordinates where value in matrix is 1 ( or 0 depending on which stays less in your matrix).
Obviously rest all possible coordinate pairs represent 0.
The disadvantage is : you will have to redefine matrix operations on such representation.
> > Which is 125 MiB of memory, minimum.
>
> Doesn't follow:
> http://en.wikipedia.org/wiki/Sparse_matrix
If this were for sparse data a simple list of Integers would represent the same data just as effectively as a matrix.
If the data is not sparse, a one-dimensional byte array would be my choice.
> Please use sparse matrices representation.Unless your
> matrix has very few zeros or 1's
> It will be List of
> pair of coordinates where
> pair of coordinates where value in matrix is 1 ( or 0
> depending on which stays less in your matrix).
If there are only a few 1s, it's sparse. If there are very few 0s it's also sparse.