Cross product inside list of lists

Hey guys ,

Do you know if it possible to get the crossproduct of only sub-lists in lists. I have tried different @L combinations but did not have any luck.

I know you can do what I did and then use x[0] or GetItemAtIndex node, but the reason I do not want that is because it takes a much longer time for hat I am trying to do.

I’m not really sure what you are trying to accomplish but I think this is the solutions.

Thanx for the respond. What I want to accomplish is only getting the result in the red squares in the above image. Your way does not help me unfortunately because you are using 2 groups.

I want to use 1 List with sublists. eg list above and use this single list to crossproduct the sublists with themselves , not with other sublist.

I would like to get the results of A and B in 1 with nothing more. Do you know if its possible ?

You can it do with code blocks even with one less node

haha thanx man.

Only you got the exact opposite result of what I needed haha. you combined the two groups but I need the groups to not combine.

And does this method work for 10 + groups. I have a X-amount of sublists. I never know how much exactly and need this to happen with whatever number X is.

Maybe something with your method and a “Count” node ? :thinking:

You did make me understand your method a bit more. Thanx!

Ah yes I see what you are trying to accomplish. I haven’t a solution because you going to need more nodes if you want to do this for a x-amount of sublists.

You will indeed need to use the count node I think.

Sadly I have no time at the moment to look further in this problem.

Would this script solve it?


Does not for me. Would you mind showing what the nodes are doing like I did ?
If it does work , I’m gonna test it for more groups.

The reason I wanted sublist to cross themselves is because im working with a lot of lists > 20 @ 3 levels :
List > List > List. I need the bottom list to crossproduct itself. I thought maybe I used the lacing of the node wrong and someone had a quick solution.

Change lacing of node “+” to cross product!

1 Like

Your script works! Now testing it for more groups.