Matching lengths in lists to get the corresponding TRUE/FALSE in the result list

Hi guys,

I’m a bit stuck on how to do this.

I’m trying to cross reference the first list of lengths with all the numbers in the second list to create the true/false list. I can only get it to find one ‘true’ in each tree, and they should have two.



The image is unreadable and useless anyway compared to posting a GH file.

Okay I’ve added the gh file. Thanks

you have two data tree with several branches, so the Equality component will try to reference and compare data from the very same branches

only exception in this case is …0:8:0 and …0:8:1 branches: because there’s no respective …0:8:0 and …0:8:1 branch in the second data tree, they will be both compared to …0:8:0

Thanks Inno.

What I’m trying to do is compare every one of those lengths in the first list to all the data trees in the second list to find the matching lengths.

I did try flattening the first list but it brought back only 10 false in the true/false data tree.

I’m not sure which functions I need to use, and this one got me the furthest with one ‘true’ in each box

I simplified the data and am posting a better image. Easy to see the tree mis-match.

Thanks Joseph. That looks much clearer for anyone to help me.

Can’t you see it? @inno explained it. The first panel has an extra “sub-branch”, {8;0} and {8;1}, that don’t match the second panel:

— First Panel —
0. 159.984109
0. 50.247064

— Second Panel —
0. 50.247064
1. 331.540112
2. 159.984109
3. 358.834599

Let me try to explain it again.

Please see the image of the lengths in the first list now the list is flattened, to hopefully help me get across what I’m trying to do.

The numbers (curve lengths) in the first list. I’m trying to compare to all the numbers in the second list (data trees) to give me two matching ‘true’ results in the final list.

The reason it wasn’t flattened in the first example is because it just gives 10 false results per data tree. If it was unflattened it does at least give me one true result which I do understand is only searching one data tree per one date tree. The bit I can’t work out is how to search all the data trees with the first list.

Try harder to understand the explanations you’ve been given. Your first panel (flattened) has ten numbers while your second panel has only nine branches.

Is this what you want?


1 Like

Does this image make more sense of what I’m trying to do?

Yes it does, but too late!

AH YES! That’s exactly it Joseph! Thanks so much!

You could have avoided a lot of flailing about by:

  1. flattening the list in the first panel instead of presenting a grafted list.
  2. describing the problem differently:
    “I want a True/False value in the third panel for every value in the second panel, depending on whether or not the value appears in the first panel.”

And of course, by posting your GH file when you started the thread, along with a readable image.