Original source code was written by Kyle Loudon - in his book Mastering Algorithms with C - published at O'Reilly Company. I have rewritten and extended some minor parts of the original source code. Finally, I want to thank Kyle and O'Reilly for giving me permisson to publish this code here at GitHub.
Kyle Loudon - and me. see file ChangeLog.md see file "UNLICENSE" above.The project documentation can be found here.
Project webpage: http://dale48.github.com/levawc/
In case you want to regenerate the documentation locally - on your box:
Clone (or download zipfile of) this project, install Doxygen - and finally run command:doxygen
- from the command prompt - when standing in the top-most directory of your clone. Then point your browser to the file index.html
in the the new subdirectory html
- recently created by this command.
In the demos
subdirectory you will find some simple demos (demo01.c, demo02.c, demo03.c, ...
) - using the ADT containers. You can build these yourself - together with a complete, single library (liblevawc.a/levawc.lib
) of all the ADT:s - by simply using the enclosed makefiles in this directory, like this:
linux.mak
- uses the native gcc compiler in Linux. Command:make -f linux.mak
mingw32.mak
- uses Mingw32 gcc Compiler in Win32 - under a native DOS Shell.
Command:mingw32-make -f mingw32.mak
msys32.mak
- uses the Mingw32 gcc Compiler in Win32 - under the MSYS Shell.
Command:make -f msys32.mak
vcwin32.mak
- uses MS Visual C compiler in Win32. Command:nmake -f vcwin32.mak
Another way, to build the library and the demos, is to download a GNU Tarball - if you are sitting on a UNIX/Linux box or if you have Cygwin or MSYS/MinGW installed - on Windows. Decompress the tarball - enter the root directory of the unpacked tarball - and then execute the usual commands for GNU Tarballs: ./configure [--prefix=...]
, make
and finally - [sudo] make install
- if you want to install. The demos are created just where you are - ready to run - and the library and header-files are installed on your system.
The demos are trying to test and show most of the public interface of the ADT:s - accordingly:
demo01.c
- testing/showing Singly-linked List ADT..demo02.c
- testing/showing Doubly-linked List ADT..demo03.c
- testing/showing Stack and Queue ADT..demo04.c
- testing/showing Chained Hash Table ADT..demo05.c
- testing/showing Heap and Priority Queue ADT..demo06.c
- testing/showing Binary Search Tree ADT..demo07.c
- testing/showing AVL Tree ADT..demo08.c
- testing/showing Circular, Singly-linked List ADT..demo09.c
- testing/showing Set ADT..demo10.c
- testing/showing Open-addressed Hash Table ADT..-
demo11.c
- testing/showing basic Graph ADT editing, BFS(Breadth-First-Search) - and DFS(Depth-First-Search).. -
demo12.c
- testing/showing interactive Graph editing.. -
demo13.c
- testing/showing Graph Algorithms, such as MST(=Minimal Spanning Tree), DSP(=Dijkstra's Shortest Path) and TSP(=Traveling Salesman Path).. -
demo14.c
- a more extensive Graph ADT application, using Dijkstra's Shortest Path algorithm. A (distance-low-cost) criss-cross flight within EU.
All demos are tested on both Windows and Linux. Tracing for memory leaks was done with Valgrind, Linux.