|
NdxShellSort -Sort Indexed Arrays using ShellSort
|
Total Hit (2753) |
«Code LangId=1»' Indexed ShellSort of an array of any type
'
' Indexed Sorts are sort procedures that sort an index array
' instead of the main array. You can then list the items in
' sorted member by simply scanning the index, as in
' For i = 1 To numEls: Print arr(ndx(i)): Next
'
' NUMEL
....Read More |
Rating
|
|
|
QuickSort - Sort Arrays using the QuickSort Algorithm
|
Total Hit (1740) |
«Code LangId=1»' QuickSort an array of any type
' QuickSort is especially convenient with large arrays (>1,000
' items) that contains items in random order. Its performance
' quickly degrades if the array is already almost sorted. (There are
' variations of the QuickSort algorithm that work goo
....Read More |
Rating
|
|
|
RLECompress - Compress a block of memory using RLE algorithm
|
Total Hit (3559) |
«Code LangId=1»Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As _
Any, source As Any, ByVal Bytes As Long)
' compress a block of memory (a string, an array, a bitmap)
' using the RLE compression algorithm
'
' Returns True if the block has been compressed,
'
....Read More |
Rating
|
|
|
SemiCRC - A fast CRC-like algorithm
|
Total Hit (1538) |
«Code LangId=1»
' Evaluate the 16-bit Checksum of an array of bytes
Function SemiCRC(bSource() As Byte) As Long
Dim lngCRC As Long
Dim lngTemp As Long
Dim lngSize As Long
Dim I As Long
Const divisor As Long = 32768
lngSize = UBound(bSource())
For I = 0 T
....Read More |
Rating
|
|
|
ShellSort - Sort Arrays using the ShellSort Algorithm
|
Total Hit (1580) |
«Code LangId=1»
' ShellSort an array of any type
'
' ShellSort behaves pretty well with arrays of any size, even
' if the array is already "nearly-sorted", even though in
' particular cases BubbleSort or QuickSort can be more efficient.
'
' LASTEL is the index of the last item to be sorted,
....Read More |
Rating
|
|
|