VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A generic stable indexed data sorting class

by Rde (54 Submissions)
Category: Data Structures
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (14 Votes)

With this generic solution you can sort any data that is stored in an indexed data storage structure such as lists, collections, and arrays of all data types, including multi-dimensional arrays and arrays of UDTs ...
Three methods are demonstrated - Event raising WithEvents, an Implemented callback, and a clever CallWindowProc technique I picked up from LukeH (selftaught) ...
The Implemented callback method is almost twice as fast as the Event raising method, and is also slightly faster than the CallWindowProc method ...
This is a complete solution that allows you to cancel sorting within the Compare routine, and also a progress parameter that indicates the percentage completed as a long value of 1 to 100. These features are included in the demo ...
Update 21 Feb 2008 tweaked a little speed and attempted to create a level performance test between the CWP method and the other two - now just a few 100ths of a second behind the Implemented method ...
Obscure Bug Fix 7 March 09. I documented they 'can sort sub-sets of the array data' but with these indexed versions if you do an error *could* occur without this very small change.

Rate A generic stable indexed data sorting class

Download A generic stable indexed data sorting class

Download A generic stable indexed data sorting class (140 KB)

A generic stable indexed data sorting class Comments

No comments have been posted about A generic stable indexed data sorting class. Why not be the first to post a comment about A generic stable indexed data sorting class.

Post your comment

Subject:
Message:
0/1000 characters