Home
 
User Manual
 
Testimonials
 
Purchase Form

Libraries
    LeastSqX   
    FFTX  
    SigProcX     
    KalmanFtX   
    SortX  
    RootX  
    EncryptX

Newcastle Scientific
7920 139th Ave SE
Newcastle, WA 98059

                     



SortX

The SortX control contains two types of functions, those utilized for sorting a vector (VectorSort), and those utilized for sorting an array of data based on a selected column (ColumnSort). A property called SortOrder sets whether any future calls to the sort functions will return the data sorted in ascending of descending order. The control accepts data declared as double float, single float, long integer, and integer.

SortX1ColumnSort_Double(Data As Double, numrows As Long, numcol As Long, SortCol As Long) As Long
 
A simple sort example:

Sub sortdata()

Dim numrow As Long, numcol As Long, selectedcol As Long
ReDim xxx(numrow, numcol) As Double 

numrow = 30
numcol = 4
selectedcol = 3

' some made up example data
For i = 0 To numrow - 1
       For j = 0 To numcol - 1
             xxx(i, j) = -10 + Rnd(1) * 20#
        Next j
Next i

' sort array row by row based on column "selectedcol", after call xxx is sorted
 Call SortX1.ColumnSort_Double(xxx(0,0), numrow, numcol, selectedcol)

end sub


Home   User Manual   Purchase   Testimonials
LeastSqX    FFTX    SigProcX   KalmanFtX   SortX   RootX  EncryptX