Code Monkey home page Code Monkey logo

avlduptree's Introduction

Short: AVL Balanced Binary Tree with Duplicates handling and GUI Demo.
Author: [email protected] (Alexander G. M. Smith)
Uploader: [email protected] (Alexander G. M. Smith)
Website: http://www.achilles.net/~agmsmith/
Version: 1.0
Type: Development/Example Code
Requires: BeOS 5.0+

AVLDupTree is a set of C subroutines (not C++, so you can use it in drivers) that is useful for indexing a set of key/value pairs, using the key to find a matching value.  The standard AVL balanced binary tree algorithm is enhanced to support multiple values for the same key.  It is designed for future use in a file system to support fast attribute indexing and queries, but you can use it for other things.

The API supports these operations:

Create a tree, with a specified data type for keys and another for values (choose from C string (any length), int32, int64, float, double).  Optionally enable multitasking protection - which allows N simultaneous readers or one writer.

Deallocate a tree and its contents.

Add a key/value pair.

Delete a key/value pair.

Iterate over the tree.  This uses a callback function for efficiency, so you can process a large batch of key/values in one operation rather than having a "find" operation to find individual ones.  It is generalized to efficiently iterate over an optionally open ended range of keys, optionally including the ones equal to your range limits (the difference between less-than-or-equal and less-than), making it ideal for query processing.


AGMSAVLTest is a BeOS GUI program for testing the tree library and demonstrating the tree operations via a graphical display of the tree.  It also has a cool subtle colour cycling effect.


AVLDupTree is released under the GNU Lesser General Public License.  The AGMSAVLTest program is released as public domain.

- Alex (Ottawa, March 2001)

avlduptree's People

Contributors

jfjhh avatar scottmc avatar waddlesplash avatar

Watchers

Jessica Hamilton avatar Niels Sascha Reedijk avatar James Cloos avatar  avatar  avatar humdinger avatar Jérôme Duval avatar  avatar  avatar

Forkers

jfjhh

avlduptree's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.