Skip to content

t3nma/glossAVL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glossAVL

Visualization of AVL Trees using Gloss.

GlossAVL GIF

Example

Using the library is as easy as:

import GlossAVL
main = do
  model <- initModel :: IO (Model Int) -- typecast to any (Ord,Read,Show) type
  run model

To compile and run this project you'll need stack:

$ stack setup
$ stack build
$ stack exec glossAVL-exe < test/tree.in

Input format

The input is a sequence of commands to perform on an initially empty AVL tree. Supported tree operations are the insertion and removal of values and the corresponding commands are +k and -k. Invalid input is ignored.

Below an example of valid input for a model of type Int:

+50
+25
+75
+30
+60
-30
+20
+80
-50

You can find input examples for bigger trees in test/.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors