Can anyone help me with following problem? I need to permanently save what I today have in arrays, to later use the data for calculations. I explain an example below.
1, I generate a long[][] which is far too big for my computers RAM. It is generated one row after the other.
2, I calculate something from my long[][] and save the results in a double[][] - also too big for my RAM. I do not need the entire long[][] at the same time, as a small batch of rows are used in the calculations at the same time, and one row in the double[][] is filled for each batch.
3, I need to sort the double[][], and do a lot of other things not important here.
4, I repeat step 2 and 3 in a number of iterations (largish, >10000), which means I care about the speed of both access and sorting.
I know the size of the arrays, but obviously I cannot initialize them as they are too big, and also because it must be initialized by an int (so far, I can only run "small" calculations). Ofcourse, I can use Maps etc, but I have failed to get this working, and I do not understand which kind(s) I should use. I have never used maps/collections etc before. In the latter case I can use one of the columns in the arrays as keys, as they are identical (except from the type). The key could simply be the row number (expressed as a long).
Preferably, I want to solve this without using a database that needs installation of a server, as my program will be used by others than me.
I am more than grateful for any help and advice!