-
Notifications
You must be signed in to change notification settings - Fork 0
fatshotty/IntroSort.js
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Performs the IntroSort algorithm (this is a beta version) ======================================== # Example using jQuery var compare_function = function(val1, val2){ return val1 < val2; }; var switching_function = function(val1, index1, val2, index2 ){ console.info( val1 + ' is now at position: ' + index1 ); console.info( val2 + ' is now at position: ' + index2 ); } $.introSort( array, compare_function, switching_function ); # Example using no js framework var compare_function = function(val1, val2){ return val1 < val2; }; var switching_function = function(val1, index1, val2, index2 ){ console.info( val1 + ' is now at position: ' + index1 ); console.info( val2 + ' is now at position: ' + index2 ); } introSort( array, compare_function, switching_function ); Thanks to: Ralph Unden (http://ralphunden.net/) for the algorithm
About
jQuery based plugin used to sort array data
Resources
Stars
Watchers
Forks
Packages 0
No packages published