I am new at java and I am currently working on a project where I need to do some special work with data. My currently problem is that I have a String matrix [5000][60000] (actually filled with '0' and '1' and I need to transforme this matrix in another with only the index. I am working with huge datasets, but I'll give a small example to make myself clear.
The idea is to read the matrix of string, analyse column by column what is '1' and then put that index (row number) in another matrix of int, as showed next:
String Matrix [2][5]=
0 1 0 0 1
1 0 1 0 1
0 1 1 1 0
I want to transforme this in -> int[][] List = { {2},{1,3},{2,3},{3},{1,2}}
Maybe this is a little basic for this forum, but any help would be very appreciated.