User | Kudos |
---|---|
8 | |
6 | |
5 | |
4 | |
3 |
I assume that the LabVIEW sort algorithm is a comparison based sorting algorithm (and my guess is that they use a form of mergesort & insertionsort, and maybe better, timsort). Anyway, for arrays of integers, string this works perfectly. For clusters and classes the implementation does not work that smooth since the sorting algorithm will always sort on the first parameter in the cluster, respectivily class. For this reason it is in my opinion that the sort VI should have some kind of ability to edit the comparison on how the sort VI actually sorts. In many languages you have the ability to do this but not in LabVIEW. This would be very usefull for when sorting classes and clusters.
A example of how this should be implemented is as followed. When the sort VI has a non-standard LabVIEW datatype as input, one should be able to add a reference to a VI (or add by a menu), with 2 inputs and 1 output. In this VI the user needs to define the rules which apply to the datatype of the input. In the end the VI will output a boolean, telling if input 1 is greater (depending on which sorting algorithm LabVIEW uses) then input 2.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.