Home
Products
Support
Blog
Resources
Company
NMath Stats User's Guide
TOC |  Previous |  Next |  Index

3.10 Sorting

The static Sort() method on class StatsFunctions sorts the elements of a data set in ascending or descending order using the quicksort algorithm and returns a new data set containing the result. The sort order is specified using a value from the SortingType enumeration.

For example:

DoubleVector v = new DoubleVector( "5 7 1 3 9 4 5 2 1 0 11 3" );    
v = StatsFunctions.Sort( v, SortingType.Descending );

NOTE- StatsSettings.Sorting specifies the default SortingType.

TOC |  Previous |  Next |  Index

Copyright © 2008 CenterSpace Software, LLC. All rights reserved.
All trademarks and registered trademarks mentioned on this web site are the property of their respective owners.
Contact Webmaster