My head is burning since hours, and the solution is probably simple:)
I just dont succed to make a simple patch that extract first conbination from a spread. Its hard to explain with words, and so easy with a patch, so please see file attached.
Thanks by advance for your precious help! I’m really stuck on this simple think… :(
Just to make it more clear, a more detailed patch with step by step explanation. And a screen shot so you dont have to open the patch.
Thanks again for your help.
But it doesnt works. (its still a better and quicker patch than mine)
For example, if you change the random list by putting the random seed input of randomize node to : 2
You will see that you eliminate the first solution with the sift node. From that kind of observation my brain starting to burn :)
Yes, my solution works only under certain conditions - I got this too late.
Main issue is that we need to do more loops in the same frame, which is not possible unless we use a plugin.
Anyway, I’m studying some c# docs, I hope to understand what I have to do to write a plugin for this - if I’ll ever be able.
Humm so here is one limit of spread… that probably something v50 will correct?
(I guess it would not be a limit if every node as bin size pin)
Its really nice to try to help me with a plugin, I really appreciate. I would love to do it myself but I’m far away from beeing able to make my own plugin:)
And if you dont find any solution, I’ll just do a dirty pach with raw of nodes. Like “getslice” the first combination, then filter the list, “getslice” the second solution etc… And I will do this 50 times so it could be ok for my application.
Up to 20 digits or 20 different numbers?
If you have 20 different numbers, worst case is that you have 20 pairs of the same number. Then you could just have a chain of subpatches that pass on a list filtered for invalid pairs to the next that does the same and the just have 20 of those. In no way elegant, but it would work if you just have 20 different values in the list.
Sorry for this misunderstanding, I mean 20 différents numbers, (from 0 to 19). So 10 combination, so 10 subpatch. And yes this chain is what I wanted to say when I said :
But I would have love the elegant way :)
(And I will do it 50 times so I can make sure that I can extend this 10 combinations limit in case I need it for my project)
hmm not sure… as in rogerlettes example the rule seems to a bit different as allready used values suddenly get used again under certain conditions. dont really get the logic here…
Tested against a lot of combinations.
rogerlette would feed it with a number of pairs, where each pair has always two different values. And your plugin returns always the valid pairs, where a valid pair is a pair that does not contain any value contained in other pair, - from first pair to last pair.
Post a patch using your plugin inside rogerlette example or indicate which seed number for randomize would return such a repetition.
I was actually looking at your plugin as it is a good example for me to learn how to do one myself.
And no, your code does not put the 8 in the “usedlist” because on the other side of the OR operation “usedlist” contain 9 so the code go to the next slice… Just perfect.
But of course, you quickly found this as mentionned in your last post, and you dont need me to explain this!
edit : looking at the time of the post, it took you less than 10min to test and find it, it took me 30min:)