Tree::Ternary

Perl implementation of ternary search trees
Download

Tree::Ternary Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Mark Rogaski
  • Publisher web site:
  • http://search.cpan.org/~mrogaski/

Tree::Ternary Tags


Tree::Ternary Description

Perl implementation of ternary search trees Tree::Ternary is a Perl implementation of ternary search trees as described by Robert Sedgewick and Jon Bentley. Ternary search trees are interesting data structures that provide a means of storing and accessing strings. They combine the time efficiency of digital tries with the space efficiency of binary search trees. Unlike a hash, they also maintain information about relative order.This module is a translation (albeit not a direct one) from the C implementation published in Bentley and Sedgewick's article in the April 1998 issue of Dr. Dobb's Journal (see SEE ALSO).SYNOPSIS use Tree::Ternary; $obj = new Tree::Ternary; $ref = $obj->insert($str); $ref = $obj->rinsert($str); $ref = $obj->search($str); $ref = $obj->rsearch($str); $cnt = $obj->nodes(); $cnt = $obj->terminals(); $cnt = $obj->pmsearch($char, $str); @list = $obj->pmsearch($char, $str); $cnt = $obj->nearsearch($dist, $str); @list = $obj->nearsearch($dist, $str); @list = $obj->traverse(); Requirements: · Perl


Tree::Ternary Related Software