Maths.IndexMap
ReferencesAn integer array of length N containing all the integers from 0 to N-1. This map encodes a specific (re)ordering of items in an array. Grasshopper uses index mapping instead of in-place sorting so that a specific ordering can be cheaply applied to more than one collection.
Constructors
Properties
Indexers
Methods
Apply<T>
#public T[] Apply<T>(T[] array)
Apply this mapping to an existing array.
Parameters:
| array (T[]) |
Combine
#Combine multiple maps into a single map which encodes the ordering of both.
Parameters:
| maps (params Maths.IndexMap[]) |
Invert
#Invert the index map. This can also be used to create an array of integers which can be used as sorting keys.