Hello,
Here below is a list molex_stubs of int arrays.
How to create a list of all permutation of array members where:
- list items are arrays of int
- item length is 14 (number of items in molex_stubs list
- 0-items of int arrays come from molex_stubs[0], 1st-item of int arrays come from molex_stubs[1], etc.
Thanks
- List<int[]> molex_stubs = new List<int[]>()
- {
- new int[] { 3, 1, -1, -3 },
- new int[] { 3, 1, -1, -2 },
- new int[] { 0 },
- new int[] { 4, 3, 1, -1, -3, -4 },
- new int[] { 2, 1, -1, -3 },
- new int[] { 0, -3 },
- new int[] { 3, 0 },
- new int[] { 3, 1, -1, -3 },
- new int[] { 4, 3, 1, -1, -3, -4 },
- new int[] { 3, 0 },
- new int[] { 2, 1, -1, -3 },
- new int[] { 0 },
- new int[] { 0, -3 },
- new int[] { 3, 1, -1, -2 }
- };

PavelPosted Oct 5, 2016, 8:36 AM
Bikesh, Midhun,
First, thank you for feedback.
Well ... probably I wasn't explicit enough with my last post: I've already found a solution and exposed it in my message.
Regards
Bikesh SrivastavaPosted Oct 4, 2016, 2:51 PM
First of all: it smells like recursion of course!
Since you also wanted to know the principle, I did my best to explain it human language. I think recursion is very easy most of the times. You only have to grasp two steps:
In human language:
PavelPosted Oct 4, 2016, 12:17 PM
Midhun TpPosted Oct 4, 2016, 10:36 AM
Please have a look at below threads-
http://stackoverflow.com/questions/14643009/generate-all-possible-combinations-from-multiple-arrays-c-vb-net
http://www.c-sharpcorner.com/forums/generate-combinations-of-multiple-arrays-dynamically
PavelPosted Oct 4, 2016, 8:33 AM
ketan borsdiyaPosted Oct 4, 2016, 7:55 AM