GithubHelp home page GithubHelp logo

algorithms's People

Contributors

dependabot[bot] avatar farbfetzen avatar

Watchers

 avatar

algorithms's Issues

Duplication in SortingAlgorithmRunner

SortingAlgorithmRunner.run and SortingAlgorithmRunner.visualize both generate random points in different ways. Only do that once before calling those methods.

Don't use logging for normal output

Instead use System.out. And catch errors in the main method and only print the message with System.err. Make a new command line argument to control if the full stacktrace should also be printed. Use logging only for development and debugging purposes.

Always record the steps and remove the other implementations.

This way I don't have to write twice the code. This makes the algorithms a bit less efficient but I don't really care about that. The main goal of this project is the visualisation.
Do the recording and the mutation in the same method, if possible. For example the swap can be done at the same time without writing two lines all the time. And operate on an instance array instead of passing the array around.
And streamline the recording a bit. Maybe something like recorder.newStep().swap(i, j).highlight(i, j).record(); where recorder is an instance variable that has access to the array and does the swapping during the swap() call.
This also means I need to create a Recorder class that is separate from the StepWiseSorter class, which would be good practice anyway.

Make visualisation mode the default and create a command line argument to disable it.

Improve the Java readme

  • List the available command line arguments
  • List the keybindings for the visualisation
  • List the implemented algorithms

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.