Grasshopper

generative modeling for Rhino

Greetings,

Does anyone know how I can select or know the value of the highest value in a list of numbers?
I'm sure this is a stupid question for most of you, so I apologize, but if anyone would be so kind, I'd be really appreciative.
Thank you very much

Tags: list, maximum, value, values

Views: 1704

Reply to This

Replies to This Discussion

That's easy, use a sort list component.

Cheers
plus select the highest item via the lenghtlist component
Using sort, list and reverse list components can always have the first number as your highest value.
image
Attachments:
Thank you very much for your patience,
in my case, I have a list of a few thousand floating point integers, and they are all listed as "item 0" so, when I use sort, I'm not getting a new list.
So I guess my question would be, how do I make a list out of the numbers that constitute a certain "item"?

Thank you once again
You can also use the Bounds component. It will create a Domain that contains all the numbers in a list.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
ahhh thank you, bounds would be a really easy way as well.
However, my problem is still the same, where I have a list where every item is item number "0" and not "0,1,2,3,4..."
So, I guess I'm still trying to take a all the numbers in an item (in this case item number 0) and turn them into a list. ?

Thanks again for all the help
Attachments:
You need to modify the data structure so that all the related numbers end up in the same list. If ALL numbers must be a single list this is fairly easy, all you have to do is Flatten the data. If your data structure contains multiple lists, it can become somewhat to shockingly more difficult. I'll need to see your data structure as a whole to be able to comment further.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Great,

Flattening worked out, I didn't know about this.
Again, thank you very much for your time!

RSS

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2013   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service