I have a set of 2D arrays, structured as so: int cage = new int[someLength]. Each array has a set column length of 4; the first two columns are all that concern us with this problem. They are used to define the row and height respectively of a point (e.g. 2,4).
What I need is to generate all possible permutations of the points using both row and column coordinates from the 2D array. I found a working method to generate all permutations for 1D array of ints here: http://stackoverflow.com/questions/2...tegers-in-java, under update 2 of the first answer.
Here is an example of a possible input and corresponding output desired:
Ideally the result will be stored in a 2D array of ints. Thanks in advance.In: (1,0) (1,1) Out:(1,0),(1,1) (1,1),(1,0)