I have a gigantic array named @AllPatterns, and each entry in the array consists of exactly 5 numbers, formated like so:-
1 2 1 1 8
1 6 5 12 12
1 1 1 1 1
1 1 1 1 1
etc. In other words: a decimal number always followed by exactly one blank space. This is guaranteed.
I need to do a couple of important sorts, and I am not sure how to pull them off. The sorts need to go like this:-
1. Sort all data by the first, then second, then third, then fouth, then 5th column.
2. After the sort completes, collapse the array until it possesses nothing but unique combinations of numbers.
3. When collapsing the table to its unique entries, keep track of all the occurences that got collapsed.
Based on the simple example above, the end result would be:-
2 - 1 1 1 1 1
1 - 1 2 1 1 8
1 - 1 6 5 12 12
...where the first number is the number of collapsed entires.
I think I know how to do number #1, but I am not sure how to do #2 and #3. Any suggestions?
Thanks,
-fiddler42
In reply to Need to sort large table of data... by fiddler42
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |