Libsanax is a generic library, written in C, that implements the most known and used data structures in programming, sorting algorithms and a tiny garbage collector. The purpose is to stop reinventing the wheel when doing homework at faculty, limited by the ANSI standard. Because the library is platform independent, it's not thread-safe; but you can make your own thread-safe wrapper functions. The garbage collector is a wrapper over the allocation functions and it isn't automatically called by the library.
The data structures organization is inspired from the Java data structures implementation and the STL(C++ Standard Template Library). It also uses some design patterns like Abstract Factory, Decorator and Singleton, to make implementation easier to understand and develop; although it's not as clear as in programming languages with classes. The library contains the following data structures : AVL tree Binary search tree Binary tree Complex number Doubly linked list Hash set Hash table Heap - binary min-heap Linked list Matrix Pair Queue Set Skip-list Stack String Tree - multipath tree Vector Graph - using adjacency matrix representation.
Also, it implements the following sorting algorithms : Generic sorting algorithms : bubble sort, insertion sort, merge sort, quick sort, selection sort, heap sort, gnome sort, cocktail sort. Numeric sorting algorithms : radix sort, number sort.
I'm working on adding : Red-black tree Treap Trie Splay Scapegoat tree B-Tree Interval tree
In the future i may add : Fibonacci heap. Other exotic data structures. Parallel and thread-safe implementation for all data structures.
For source code and documentation, see downloads section.
These details are provided for information only. No information here is legal advice and should not be used as such.