Bar Graph with C# ? Find Domain and M.index C# script? SOLVED

Hello to all.
I’m not good at python, but despite my research I can’t find a way to search by domain on python.
In fact I’m surprised by the time it takes the FDom - > CSet - > MIndex function compared to the Bar Graph output.

The goal would be to know the number of occurrences (of Set) in my list of numbers.

I have a really large number of numbers, in this example I only deal with 100.000 numbers but in my real project we are talking about 2.000.000 at least, the calculation time takes me 10-15min, I was hoping that a python script would allow me to go faster.

Thanks for reading, and don’t hesitate to guide me :slight_smile:
test member (912.6 KB)

Hello again

I’m updating the topic, I still can’t find a function that would be interesting under python

I tried this python script (attached in the gh file) but without success, the resolution time is longer than the native components of grasshooper

Someone would have a wonderful idea to submit :slight_smile: ?

test member (919.6 KB)

In fact my goal would be to extract the results of the bar graph (i.e. the number of data according to a defined interval)


Thanks a lot @maje90

You found a way in C#

The end of the code is not great (I did it myself), which is why I still have to go through splits to get the final list.

But the time saving is just CONSIDERABLE

Here the code in the GH file
test member index (1.8 MB)

Just to show you the time savings in the context of my project:

with FDom + CSet + Mindex around 30-35min …
with C# around 20 sec !!!

Hoping that it will help other people
Thanks again