Creating files based on column from 2D Matrix - Java -
i have big matrix nx2 - yes 2 columns thousand of lines) , create 1 file per "group" of lines. grouping should done columns has date.
my matrix sorted, i'm struggling create file in have each line representing record former matrix
for example, have following structure in matrix:
col0 col1 1234 environmental sciences & ecology 1997 chemistry; mathematics; physics 1997 science & technology - other topics 1997 neurosciences & neurology; physiology 2002 dermatology 2005 biochemistry & molecular biology 2005 geochemistry & geophysics each "date" (they string in code) file respecting value(s). in case, 1997 , 2005 2 lines each, 1 each "repetition".
my question is, how put every record (in separate lines) each date. ordered in attempt make things easier didn't help
any welcome.
you can use map<string, list<string>> collecting data in groups year. can iterate through map , create file each entry , write entry values map.
Comments
Post a Comment