Creating a matrix of size[15088][15088][5] in java runs me out of heap space using int as a datatype. How would I create one? Using the command -Xmx did not help.
int[][][] a=new int[15088][15088][5];
Creating a matrix of size[15088][15088][5] in java runs me out of heap space using int as a datatype. How would I create one? Using the command -Xmx did not help.
int[][][] a=new int[15088][15088][5];
If you use 15088 * 15088 * 5 size of array, then the array needs 15088 * 15088 * 5 * 4 bytes = 4.24 GB(approximately)** of heap size. If the data is sparsely distributed then you could use other data structures like described in the following references.