UnderwareDESIGN

PlayBASIC => Resources => Source Codes => Topic started by: kevin on May 28, 2010, 06:52:19 PM

Title: Quick Sort Typed Arrays
Post by: kevin on May 28, 2010, 06:52:19 PM
  Quick Sort Typed Arrays

  This example comes with a little library to help you sort typed 1D arrays into ascending order.   To use the library, you must declare your type as a child of the libraries parent type.  Your array can then to sorted using the lib's sort function, as long as you set the SortOnValue field, this is the field the library uses as the sort key.    Speed wise, the library uses the quick sort algorithm, so even though it's standard PB code, it's still pretty efficient.    




Other Sorting Examples

  Radix Sort Examples (http://www.underwaredesign.com/forums/index.php?topic=2882.0)
  Better Bubble Sorting (http://www.underwaredesign.com/forums/index.php?topic=159.0)
  Bubble Sort Typed (Character) Array (http://www.underwaredesign.com/forums/index.php?topic=2244.0)



Download

  Attached