Sort
Use a Curve object to sort a Y data set according to an X data set.
BOOL Sort( DWORD dwFlags = 0 )
Returns TRUE on successful exit and FALSE on error.
EX1
// Assumes Book1_A and Book1_B exist and contain data, better fill columns with random data as to check the result. int curvebase_Sort_ex1(string dsName1 = "Book1_A", string dsName2 = "Book1_B") { Curve crv("Book1_A","Book1_B"); crv.Sort(NS_DESCENDING | NS_MISSING_AS_SMALLEST); return 0; }
Use a Curve object to sort a Y data set according to an X data set. This function does nothing if is there is no X data set associated with the Y data set. Please note that constructor of curve that takes two Dataset is just making a copy of the Datasets, they are not attached to the curve. So even you made some changes to the curve, it will not affect the original Dataset. Due to this reason, the curve sort will ONLY work on the X Dataset, So if one want to make sort on Y Dataset, he may need to construct a curve with X and Y dataset swapped first.
Data_sort
origin.h