Skip to content

lkujaw/avltrees

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AVLTREES

AVLTREES is a threaded, self-balancing, binary trees library for Ada (1987), based upon the algorithms developed by G. M. Adelson-Velsky and E. M. Landis, often abbreviated AVL in the literature.

Usage Example

The following specification provides an example of how to instantiate the generic package AVL_Array_Key_Trees for the implementation of a symbol table:

with AVL_Array_Key_Trees;
with Types;

package AVL_Index_Trees is new AVL_Array_Key_Trees
  (Key_Index_T   => Positive,
   Key_Element_T => Character,
   Key_T         => String,
   Element_T     => Types.Symbol_Record_T,
   Is_Less_Than  => "<");

Ada 1987 Compatibility Note

This package utilizes Ada 1995 pragmas within the following package specifications:

  • AVL_Array_Key_Trees (src/avarketr.ads): Preelaborate
  • AVL_Trees (src/avltrees.ads): Preelaborate
  • AVL_Tree_Heights (src/avtrehei.ads): Pure

Per section 2.8 of the Ada 1987 Language Reference Manual, "[a] pragma that is not language-defined has no effect if its identifier is not recognized by the (current) implementation." However, as these pragmas are merely advisory to the compiler, they may be removed without adverse effect from the above files should they cause any issues.

License and Warranty

AVLTREES is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

AVLTREES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Copies of the GNU Lesser General Public License and the GNU General Public License are provided within the files named license.txt and gpl3.txt, respectively; the Free Software Foundation also publishes copies online.

SPDX-License-Identifier: LGPL-3.0-or-later

About

Threaded AVL trees library for Ada

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages