Giter Club home page Giter Club logo

algorithm-networksort's People

Contributors

hoytech avatar jgamble avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

hoytech clayne

algorithm-networksort's Issues

Update Documentation

As the subject says. Examples need improvement, and there's leftover text from the non-object oriented version.

algorithms which not change order of equal elements ?

I'm apologise, this is more question than actual issue report.
but, is there any known efficient sorting networks or algorithms, which leave equal elements in its original order ? except obvious bubble sort.

if yes, is it possible to include them in this project ?

PS: thank you for your work and researches.

Add 16-input network by David Van Voorhis, ...

... as described in chapter 5 of Designing Sorting Networks.

I have a name question: should I include the 'Van' when making a key out of his name? Right now the key is 'voorhis16', and I'm wondering if it should be 'vanvoorhis16'. I am very ignorant of naming conventions, unfortunately.

Likewise, Worldcat has the surname of the author of Designing Sorting Networks as Baddar, not Al-Haj Baddar, so I'm going to change her entry keys to 'baddar##'.

If I'm being an idiot in one or more respects, please let me know..

Treat endpoint circles of inputs and comparators separately

Right now a single radius value is used for the endpoints of both comparator and input lines. But the Knuth diagrams in The Art of Computer Programming have, for example, circles on the comparator lines, but not the input lines.

There need to be two radius keys ('compradius' and 'inputradus') to let users mimic the style of TAoCP.

Best size and best depth sorting networks

The "Best" algorithm could be split into two different categories: "Best size networks" (the current "Best") and "Best depth networks". While these networks are more or less the same for the small sorting networks, the best size-optimal and depth-optimal networks that we currently know for sizes > 16 are not always the same. For example, the paper Sorting Networks: to the End and Back Again by Codish & al. presents new sorting networks for sizes 17, 18, 19 and 20 whose depth is better than the ones we knew (and prove the resulting sorting network 17 to actually be depth-optimal).

Size-optimality and depth-optimality are interesting in different contexts, so providing both could be interesting for users, depending on what they need their sorting networks for.

Change To Object-Oriented Code

Much of the code would be simplified if the network was changed into an object, particularly the code that counts comparisons and comparators-in-parallel.

Postscript Output Not Parsing

Postscript code from version 2.01 is not parsing. I'll have to check, but I don't believe there's been a change from the initial version that had a postscript output, so it may be that the postscript parsers I used to check the output back then were more lax.

Regardless, this needs fixing.

Final Documentation Push For 2.00

I think we're at a satisfactory point with the code. That leaves the documentation, which could stand improvement beyond the updated lists.

Rename (and Add to) Default Exports

The exported functions from Algorithm::Networksort

  • nwsrt()
  • nwsrt_algorithms()

The exported functions from Algorithm::Networksort::Best

  • nwsrt_best()
  • nwsrt_best_names()
  • nwsrt_best_title()

Yeah... I didn't consider what I was doing as far as consistency goes at all.

The plan: In Algorithm::Networksort, add an nwsrt_title() function, and rename nwsrt_algorithms() to nwsrt_names().

cc @hoytech because although I don't think enough days have gone by to catch people with this, you might be the exception.

Implement Shell sort

If we add a shell sort implementation I think we'll have pretty much all the "classic" algorithms covered.

I think I have a print-out of Pratt's Shellsort and Sorting Networks somewhere, I'll see if I can dig it up and send a pull request...

More size-optimal algorithms

More size-optimal sorting networks have been discovered recently thanks to several research projects (well, not size-optimal per se, but as optimal as we could find). The paper Using Symmetry and Evolutionary Search to Minimize Sorting Networks by Valsalam and Miikkulainen provides sorting networks using less compare-exchange units for sizes 17, 18, 19, 20, 21, 22 and 23 (even though the one of size 23 isn't better than sorting both halves of the array with the sorting networks of sizes 12 and 11 then using a Batcher's merge network to merge the two sorted halves).

I think that the "Best" algorithm could be extended to provide the best known size-optimal networks until size 32.

Running t/best.t takes too long

The best.t test really slows down the CPAN installation.

I wonder if it's possible to do a "quick sanity check" that does a small sub-set of a full zero-one test unless the AUTHOR_TESTING environment variable is set, similar to how abecedarian.t works.

Better sorting networks

Hi :)

Some guy (Bert Dobbelaere) recently found new sorting networks with better size and/or depth than the ones in the current litterature. You should check out his project. There's also an extensive list of "best" sorting network that you might want to use to complete your library; you might also want to follow the project ince it is updated from time to time.

Cheers.

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.