Permalink
Commits on May 18, 2015
  1. move to browserify

    committed May 18, 2015
Commits on Jan 3, 2015
  1. Merge pull request #16 from betaveros/yellow-compare

    Change compare color to nicer, higher-contrast yellow
    committed Jan 3, 2015
Commits on Nov 12, 2014
Commits on Nov 1, 2014
  1. Merge pull request #15 from betaveros/insert-swap

    Simplify insertion sort and add a version using swaps
    committed Nov 1, 2014
Commits on Oct 18, 2014
  1. Simplify insertion sort and add a version using swaps

    * It's not necessary to use a break in the original insertion sort
      logic; an extra condition in the loop will do just fine.
    * Insertion is an unavoidable O(n) cost in traditional
      insertion sort (unlike its usage in the other sorts, where the
      operations that correspond to what it's used for are O(1) if
      additional memory is used). The version using swaps better reflects
      its time complexity.
    betaveros committed Oct 18, 2014
Commits on Oct 14, 2014
  1. Update link to live version

    This has been a long time coming.
    committed Oct 14, 2014
  2. Merge pull request #13 from betaveros/update-checked

    Update VA by checkbox statuses on document ready
    committed Oct 14, 2014
  3. Merge pull request #12 from betaveros/adaptive-insertion

    Make insertion sort adaptive and stable
    committed Oct 14, 2014
  4. Merge pull request #11 from betaveros/lt-gt-entity

    Replace < and > with entity references
    committed Oct 14, 2014
  5. Update VA by checkbox statuses on document ready

    Since browsers may cache checkbox statuses, and this probably reflects
    customizations chosen by the users, we should make sure VisualArray
    notices cached statuses and actually responds to them.
    betaveros committed Oct 14, 2014
  6. Make insertion sort adaptive and stable

    The traditional insertion sort should scan for the insertion point
    leftwards from the right end of the sorted range. This does not improve
    the asymptotic performance, but it makes insertion sort both adaptive
    and stable.
    betaveros committed Oct 14, 2014
Commits on Feb 25, 2014
  1. Added MIT license

    committed Feb 25, 2014
  2. flip the speed indicator

    Now fastest is on the right, as a sane person
    would expect.  Also, allow the stepLength to go
    as low as 1ms
    committed Feb 25, 2014
Commits on Feb 23, 2014
  1. add gnome sort

    committed Feb 23, 2014
  2. fix the fork me on github banner

    that has been broken for god knows how long
    committed Feb 23, 2014
Commits on Oct 4, 2011
Commits on Oct 3, 2011
  1. add some comments; use @get on any user-initiated value checks (for c…

    …ache behavior checking)
    committed Oct 3, 2011
  2. Merge pull request #7 from dduponchel/master

    Check index and allow user input for values.
    committed Oct 3, 2011
Commits on Oct 1, 2011
  1. Custom values and negative values.

    Allow the user to specify a custom array for the values. The values can
    be positive, zero or negative.
    - Added a new class, Element, which represents each point drawn
      (previously split between @values and @indices).
    - Added two options for visualization : normalizeBars and
      alwaysShowLevelZero.
    - Added a simple favicon and a title to the html page.
    - Rewritten the scale method to handle the negative values.
    - Added a simple favicon.
    dduponchel committed Oct 1, 2011
  2. Extract the VisualArray class to add tests.

    There is still some $("#my-dom-elt") calls in the VisualArray class
    (stats update), but we can add unit tests.
    dduponchel committed Oct 1, 2011
Commits on Sep 29, 2011
  1. ignore graphs.js file

    This file can be generated with the coffee script, and is useful for
    debuging (we have the real functions name instead of anonymous
    functions).
    dduponchel committed Sep 29, 2011
Commits on Sep 28, 2011
  1. Don't redraw the whole canvas at each step

    Instead of redrawing everything on each step, redraw only useful parts.
    After firebug's profiling on a merge sort :
    
    Function              |Calls |Percent |Own time
    == BEFORE ==
    drawIndex (graphs.js)  141008 46.12%  4017.854ms
    redraw (graphs.js)       1329 14.43%  1256.978ms
    append (jquery)          4248  8.54%   743.907ms
    scale (graphs.js)      282016  8.39%   730.538ms
    == AFTER ==
    drawIndex (graphs.js)   15518 24.01%  1037.125ms
    append (jquery)          4208 22.41%   968.085ms
    empty (jquery)           4208 10.11%   436.832ms
    playStep (graphs.js)     1053  8.72%   376.643ms
    
    My CPU usage has also gone from 100% to ~80%.
    This is of course only an indication : it's the result of just 2 runs
    (one before, one after), the array to sort wasn't shuffled the same way,
    etc. Nevertheless, it still shows some improvements :)
    dduponchel committed Sep 27, 2011
  2. Refactor : sort/reverse, insert, etc

    Use the builtin sort/reverse function
    Use Array.splice to implement "insert"
    Simplify boolean and checkbox
    dduponchel committed Sep 28, 2011
  3. Merge pull request #5 from kballard/lsb-radix-tweak

    Show bit in LSB Radix
    committed Sep 28, 2011
Commits on Sep 27, 2011
  1. Allow for values outside of the range of [1..length]

    Populate the array of values with numbers from 0 to 2^10-1.
    Maintain a separate array of "indices" whose sort order matches the sort
    order of the values. This allows for a nice even triangle when sorted,
    whereas using the values directly would provide an uneven slope.
    
    Update all of the swap and insert functions to take advantage of
    CoffeeScript's array destructuring syntax. This means no more tmp
    variables.
    
    Reimplement shuffle as a Fisher-Yates shuffle.
    kballard committed Sep 27, 2011
  2. Show bit in LSB Radix

    The mask as a decimal is hard to understand. Show the bit instead, to
    match what MSB Radix is doing.
    kballard committed Sep 27, 2011
  3. add LSB radix sort

    committed Sep 27, 2011
  4. Merge pull request #2 from kballard/radix-highlight

    Add persistHighlight() and locals.bit to radix sort
    committed Sep 27, 2011