Discussion:
Self balancing trees
Christopher Howard
2017-08-22 02:52:12 UTC
Permalink
Hello, where do I find a self-balancing tree structure to use with
guile? I'm new to guile, but I can't seem to find what I'm looking for
in the guile info document, or in the gnu guile library collection.
Marko Rauhamaa
2017-08-22 04:31:06 UTC
Permalink
Post by Christopher Howard
Hello, where do I find a self-balancing tree structure to use with
guile? I'm new to guile, but I can't seem to find what I'm looking for
in the guile info document, or in the gnu guile library collection.
If you can't find anything else, here's mine:

http://pacujo.net/~marko/avl-tree.scm


Marko
Christopher Howard
2017-08-22 05:07:39 UTC
Permalink
Post by Christopher Howard
Hello, where do I find a self-balancing tree structure to use with
guile? I'm new to guile, but I can't seem to find what I'm looking for
in the guile info document, or in the gnu guile library collection.
   http://pacujo.net/~marko/avl-tree.scm
Marko
Thank you! This looks very helpful! However, there is too much code
here for me to use it without an explicit license. Would you please let
me know under which license you are releasing the code?
--
https://qlfiles.net
https://emailselfdefense.fsf.org/en/
Marko Rauhamaa
2017-08-22 05:16:06 UTC
Permalink
Post by Christopher Howard
Thank you! This looks very helpful! However, there is too much code
here for me to use it without an explicit license. Would you please
let me know under which license you are releasing the code?
Public domain.


Marko
Kovacsics Róbert
2017-08-22 09:33:51 UTC
Permalink
Sorry Marko, I didn't hit reply all, so re-sending for the benefit of the list.

I'd just like to point out
https://wiki.rice.edu/confluence/download/attachments/2761212/Okasaki-Red-Black.pdf
for the simplicity of it's Red-Black tree implementation. Granted, it
uses Haskell, but you could implement it similarly simply as Guile has
pattern-matching too with (ice-9 match). Also, it hasn't got a delete
operation, that would be more messy.
Nala Ginrut
2017-08-23 04:00:11 UTC
Permalink
Here's mine, but I haven't updated for a while, RB tree works, please don't
use it seriously, and hope it inspire you.

https://github.com/NalaGinrut/nashkel/blob/master/nashkel/rbtree.scm
Post by Kovacsics Róbert
Sorry Marko, I didn't hit reply all, so re-sending for the benefit of the list.
I'd just like to point out
https://wiki.rice.edu/confluence/download/attachments/2761212/Okasaki-
Red-Black.pdf
for the simplicity of it's Red-Black tree implementation. Granted, it
uses Haskell, but you could implement it similarly simply as Guile has
pattern-matching too with (ice-9 match). Also, it hasn't got a delete
operation, that would be more messy.
Loading...