Note: The ncsu_final branch has some new features, but has not been thoroughly tested
This software is licensed by a Gnu Public License. See https://www.gnu.org/licenses/gpl.html for details.
If you have questions, comments or bugs to report, please contact me at mfms@ncsu.edu
New: There is a JavaScript version of Galant under development. It can be accessed as a web app at galant.csc.ncsu.edu and the source code downloaded at github.com/mfms-ncsu/galant-js
You can run Galant immediately by opening a terminal window, going to the galant home directory and executing:
java -jar build/jar/Galant.jar
or (in Windows)
java -jar build\jar\Galant.jar
Make sure that
- you have a JDK installed (Java Development Kit)
- the JAVA_HOME environment variable is set properly; typical locations (Mac) /Library/Java/JavaVirtualMachines/jdk1.x.x.jdk/Contents/Home/ (Windows) C:\Program Files\Java\jdk1.x.x (Linux) don't need to do anything special on most Linux/Unix systems
Otherwise you may get an exception (null pointer or unexpected) from edu.ncsu.csc.Galant.algorithm.code.CompilerAndLoader.compile Galant needs to be able to fire up a Java compiler while it is running.
You may want to (re)compile everything, either because you edited and changed some of the details in the source files, or, if you use GitHub to keep up with the latest changes, you need Apache ant. Once that is installed, say
ant jar
After that you can run Galant with
ant run
Before you do a 'git pull' you should first either do 'ant clean' or remove the file build/jar/Galant.jar (build\jar\Galant.jar)
Simple Instructions
- Use
File->Opento open an algorithm or a graph - algorithms are in the
Algorithmsfolder, graphs inExample-Graphsor, for sorting algorithms, the0-SortingGraphsfolder below that - To run an algorithm on a graph, make sure the (drawing of the) graph is in the graph window and the (text of the) algorithm in the text window
- Click
Compile and RunorRun(if the algorithm is already compiled) - Click in the graph window
- The left/right arrow keys are used to move forward/backward in the algorithm; holding them down allows you to control speed
- The escape key stops the animation
Use File->Preferences->Open/Save to set the default starting directory for file browsing.
Testing (see testingGalant.docx for more details)
First set the home directory for opening and saving files
File -> Preferences -> Open/Save
to the top level directory of Galant so that all the relevant files
are easy to get to.
Then do the following test runs. Each time, open the algorithm and the graph
files and first hit compile when the text window shows the algorithm and Run
when the text window shows the algorithm and the graph window shows the
graph. The algorithms are in the Algorithms folder and the graphs in Example-Graphs.
| Algorithm | Graph |
|---|---|
dfs_d.alg |
eight_node_graph.graphml |
interactive_dfs |
" |
dijkstra.alg |
weighted_example.graphml |
insertion_sort.alg |
0-SortingGraphs/sorting_test.graphml |
binary_tree.alg |
an empty graph |
Notes:
- for
dijkstra.algtry both the directed and undirected version of the graph (useCtrl-dto toggle) - to create an empty graph click on left arrow below
Fileuntiluntitled graphappears
For more information and links to important resources, see 0-index.html.
Note about the name. Aside from being an acronym for graph algorithm animation tool, Galant (pronounced gahlahnt -accent on second syllable) is a term for a musical style that featured a return to classical simplicity after the complexity of the late Baroque era. We hope to achieve the same in our approach to algorithm animation.
Major Contributors
- Matthias Stallmann, designer and lead developer
- Senior Design Team, Fall 2013: Jason Cockrell, Ty Devries, Alex McCabe, Michael Owoc
- Independent study students, Summer 2016: Weijia Li, Yuang Ni and Kai Pressler-Marshall
- Senior Design Team, Spring 2021: Samy Bencherif, Shengdong Chen, Tianxin Jia, Ji Li and Qihao Lu. Note: The contributions of this team have not been merged into the
mainbranch; they are in thedevelopmentbranch