Skip to content

fatshotty/IntroSort.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

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

No packages published