Grasshopper

algorithmic modeling for Rhino

Hello, I thought I had seen this come up on the forums before, but I can't seem to find it.

I have a list of numbers and some of them are duplicates. I want to be able to either count the number of times each number is repeated, or find each number that is less than a certain number of duplicates (either would work, and I assume the steps to getting to both are very similar).

I would like to do it without vb or c# if possible.

Thanks, and I'll be hacking away at it in the mean time.

Views: 8095

Replies to This Discussion

Cool! Thanks Chris!

I actually figured out a way to do it, but it took way  more components than this.

Basically, I created a range that my sample of duplicates would be in, tested if each number in the sample equaled each number in the range. Then I culled pattern each number in my sample list. Then finally used List Length to find out how many times each number was duplicated.

Your solution is much more graceful

Can you please show the entire process ? I am using float numbers which cannot be done using set.

Hi Chris,

Do you know of any video, tutorial, book, topic which explains the components from the Sets->Sets tab (the ones you just used)?

From time to time, I see people using it, and I can see they are quite powerful. Still I did not find even one source where an explanation of each of those components is presented.
Right click->Help on them, is not enough.

Thank you for the reply.

Thank you.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service