Package: lang/prolog/code/ext/trees/ Name: Summary: Prolog 2-3 Trees Package Version: 21-AUG-91 Description: This package contains a set of Prolog predicates for associating keys with values using 2-3 trees. Because 2-3 trees are used, they automatically rebalance after each insertion or deletion. For example, ?list_to_23( [ cat-dog, hare-rabbit, "hair"-"fur", king-queen, exp(1)-2.71828, 3.141593-pi ], Tree ), portray_23( Tree ), put_23( 39, Tree, steps, Tree1 ), portray_23( Tree1 ). gives 23 Tree{ 3.141593 - pi cat - dog hare - rabbit king - queen exp(1) - 2.71828 [104, 97, 105, 114] - [102, 117, 114] } 23 Tree{ 3.141593 - pi 39 - steps cat - dog hare - rabbit king - queen exp(1) - 2.71828 [104, 97, 105, 114] - [102, 117, 114] } There is no routine for deleting items from a tree (you can replace them), but it would not be hard to write one. Requires: Ports: Edinburgh-compatible Prologs. Origin: Email from Mark Johnson, file tree23.pl. Copying: Updated: CD-ROM: Prime Time Freeware for AI, Issue 1-1 Bug Reports: Mailing List: Author(s): Mark Johnson <mj@cs.brown.edu> Cognitive and Linguistic Sciences Brown University, Box 1978 Providence, RI 02912 Tel: 401-863-1670 Fax: 401-863-2255 Contact: Keywords: Prolog!Code, Prolog!Extensions, 2-3 Trees, Authors!Johnson, Brown University Contains: See Also: References: ???