Coder Social home page Coder Social logo

sortvis's People

Contributors

cortesi avatar habnabit avatar joernhees avatar rlankenau-tibco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sortvis's Issues

tests fail

with trunk sortvis, pry, and scurve, the tests fail in scurve.Hilbert.fromSize. here's the traceback I get.

The first exception occurs because log2(16) == 4 and dimension == 3; I'll try to get clearer on what Hilbert is doing because I don't really understand what's going on there right now.

Add Dual-Pivot Quicksort

There's been a particular flavor of Quicksort in the Java library for a few years. The design space of Quicksorts is huge, sure, but I think a (basic version of) this one deserves being included in your selection.

I've implemented it in your framework here. No attribution required.

AssertionError in Bitonic Sort

Running

sortvis weave -x 850 -t -n 20 -c gradient

as given on your website, I get this:

    110 comparisons
    67 comparisons
    154 comparisons
Traceback (most recent call last):
  File "./sortvis", line 305, in <module>
    main()
  File "./sortvis", line 282, in main
    algos.algorithms[i](track)
  File "/.../sortvis/libsortvis/algos/bitonicsort.py", line 30, in bitonicsort
    assert math.modf(math.log(len(lst), 2))[0] == 0
AssertionError

Maximum Recursion Depth Reached in Timsort for N=1400

I was trying to find an implementation of Timsort in Python, and came across the one in this repository. I decided to clone the sorting algorithms in the repo to benchmark an algorithm I came up with against others, and found that your implementation reaches a maximum recursion depth at N=1400.

	Time to sort N=1400 randomly generated values between 0 and 256 using skipsort: 0.023 secs

	Time to sort N=1400 randomly generated values between 0 and 256 using quicksort: 0.050 secs

	Time to sort N=1400 randomly generated values between 0 and 256 using mergesort: 0.085 secs

	Time to sort N=1400 randomly generated values between 0 and 256 using radixsort: 0.092 secs

Traceback (most recent call last):

  < omits unnecessary trace >

  File "/home/oleg/CLionProjects/CFastSort/src/sorting_algorithms.py", line 317, in timsort
    sorted_array = timsort_merge(sorted_array, run)
  File "/home/oleg/CLionProjects/CFastSort/src/sorting_algorithms.py", line 281, in timsort_merge
    return [left[0]] + timsort_merge(left[1:], right)
  File "/home/oleg/CLionProjects/CFastSort/src/sorting_algorithms.py", line 281, in timsort_merge
    return [left[0]] + timsort_merge(left[1:], right)
  File "/home/oleg/CLionProjects/CFastSort/src/sorting_algorithms.py", line 281, in timsort_merge
    return [left[0]] + timsort_merge(left[1:], right)
  [Previous line repeated 985 more times]
  File "/home/oleg/CLionProjects/CFastSort/src/sorting_algorithms.py", line 280, in timsort_merge
    if left[0] < right[0]:
RecursionError: maximum recursion depth exceeded in comparison

graphs only plot swaps, not comparisons

Just out of curiosity, it seems you compressed the graphs so they don't show actual comparisons but just swaps (i.e. successful comparisons, which lead to a change).
Is there an option to change this, maybe even showing the two elements being compared?
I think this would give a much more detailed view of the true nature of an algorithm, e.g. showing analyzing runs such as in timsort.

"dense" fails

with the same error as the tests did, when you use the default options. Dimensions of 8, 64, and 512 work but the default of 256 doesn't. (Because math.log(256, 2) == 8 is not divisible by three in hilbert.py)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.