Sorting Visualizer/Audiolizer
mkdir -p dist target
javac src/array/visualizer/ArrayVisualizer.java -sourcepath src -d target/
jar -cvfm dist/ArrayVisualizer.jar manifest.mf -C target/ ./
java -jar dist/ArrayVisualizer.jar
=======
Sorting Visualizer with 6 different views and 14 included sorting algorithms
License: MIT License
Sorting Visualizer/Audiolizer
mkdir -p dist target
javac src/array/visualizer/ArrayVisualizer.java -sourcepath src -d target/
jar -cvfm dist/ArrayVisualizer.jar manifest.mf -C target/ ./
java -jar dist/ArrayVisualizer.jar
=======
Allow for someone to create another file and have the program automatically recognise and add the sorting algorithm.
This could be done with an interface or abstract algorithm class, or even using carefully designed class files and reflection.
This would allow for the removal of the hard coded switch statements in main and make the code more flexible.
Update the sorting algorithms to let ArrayController manage the array access and comparison counts (aa
and comps
).
Currently, each sorting algorithm manually updates the comparison and access counts. By delegating access and comparison to the ArrayController (via get
and compare
), the counts could be managed automatically, and new statistics could be added without needing to update each sorting algorithm to implement it.
I was chatting in my Discord with Aphitorite on GitHub, and they actually dug into your "disparity curve" formula a bit. Some interesting stuff was discovered, and we wanted to share it with you!
So first of all, we were talking about my modified version of your formula from my fork that's able to handle arbitrary array lengths, which is the following:
double len = ((ArrayVisualizer.getCurrentLength() / 2d) - Math.min(Math.min(Math.abs(i - array[i]), Math.abs(i - array[i] + ArrayVisualizer.getCurrentLength())), Math.abs(i - array[i] - ArrayVisualizer.getCurrentLength()))) / (ArrayVisualizer.getCurrentLength() / 2d);
Yeah, I know... I didn't refactor it after changing it around, and the line of code it takes up is an absolute mess. But it turns out that you had written up a partial triangle wave function (without using trig functions)!
https://cdn.discordapp.com/attachments/592103638034415647/733325936417570926/SharedScreenshot.jpg
That's why the peaks of the disparity circle visual are always jagged! You can especially see that here:
Your original formula:
https://cdn.discordapp.com/attachments/592103638034415647/733197874434932807/Screenshot_516.png
versus Aphitorite's new cosine wave formula:
https://cdn.discordapp.com/attachments/592103638034415647/733197892264656946/Screenshot_515.png
Their new cosine wave formula is as follows:
double len = (1 + Math.cos((Math.PI * (array[i] - i)) / (ArrayVisualizer.getCurrentLength() * 0.5))) * 0.5;
I personally found this super fascinating; hope this was interesting for you too!
it doesn't let me open it, and its probably a mistake that i did since im not experienced in this stuff, but anyway, please help.
Please help, I do not understand Command Prompt
The sound still works, but the awesome sound you have in your videos is what I want in the program.
Any chance you could add a build script?
If there is a way to do that, then Bogo wouldn't be straining so much. [It's accessed the array 1.54B times, at 20,000x speed.]
There is no .jar file that means i cant open the program. Please fix this please.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.