Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.223.208 Times

Tree::Binary::Search 0.07

  Date Added: October 13, 2010  |  Visits: 1.173

Tree::Binary::Search

Report Broken Link
Printer Friendly Version


Product Homepage
Download (253 downloads)



Tree::Binary::Search is a binary search tree for Perl. SYNOPSIS use Tree::Binary::Search; my $btree = Tree::Binary::Search->new(); $btree->useNumericComparison(); $btree->insert(5 => "Five"); $btree->insert(2 => "Two"); $btree->insert(1 => "One"); $btree->insert(3 => "Three"); $btree->insert(4 => "Four"); $btree->insert(9 => "Nine"); $btree->insert(8 => "Eight"); $btree->insert(6 => "Six"); $btree->insert(7 => "Seven"); # this creates the following tree: # # +-------(5)----------+ # | | # +-(2)-+ +-(9) # | | | # (1) (3)-+ +----(8) # | | # (4) (6)-+ # | # (7) # $btree->exists(7); # return true $btree->update(7 => "Seven (updated)"); $btree->select(9); # return Nine $btree->min_key(); # returns 1 $btree->min(); # returns One $btree->max_key(); # return 9 $btree->max(); # return Nine $btree->delete(5); # this results in the following tree: # # +-------(6)-------+ # | | # +-(2)-+ +-(9) # | | | # (1) (3)-+ +-(8) # | | # (4) (7) # This module implements a binary search tree, which is a specialized usage of a binary tree. The basic principle is that all elements to the left are less than the root, all elements to the right are greater than the root. This reduces the search time for elements in the tree, by halving the number of nodes that need to be searched each time a node is examined. Binary search trees are a very well understood data-structure and there is a wealth of information on the web about them. Trees are a naturally recursive data-structure, and therefore, tend to lend themselves well to recursive traversal functions. I however, have chosen to implement the tree traversal in this module without using recursive subroutines. This is partially a performance descision, even though perl can handle theoreticaly unlimited recursion, subroutine calls to have some overhead. My algorithm is still recursive, I have just chosen to keep it within a single subroutine..

Requirements: No special requirements
Platforms: Linux
Keyword: Binary Binary Search Binary Search Tree Insert Libraries Programming Search Search Tree Tree Treebinarysearch
Users rating: 0/10

License: Freeware Size: 27.65 KB
USER REVIEWS
More Reviews or Write Review


TREE::BINARY::SEARCH RELATED
Miscellaneous  -  Binary ordered tree 1.1
This script is a simple example demonstrating the construction of binary trees.
 
Libraries  -  Tree::Binary 0.07
Tree::Binary is a Object Oriented Binary Tree for Perl. SYNOPSIS use Tree::Binary; # a tree representaion of the expression: # ((2 + 2) * (4 + 5)) my $btree = Tree::Binary->new("*") ->setLeft( Tree::Binary->new("+")...
27.65 KB  
Libraries  -  Parse::Binary::FixedFormat 0.10
Parse::Binary::FixedFormat is a Perl module to convert between fixed-length fields and hashes. SYNOPSIS use Parse::Binary::FixedFormat; my $tarhdr = new Parse::Binary::FixedFormat [ qw(name:a100 mode:a8 uid:a8 gid:a8 size:a12 mtime:a12...
31.74 KB  
Libraries  -  Tree::Visualize 0.01
Tree::Visualize is a Perl module for visualizing Tree structures. SYNOPSIS use Tree::Visualize; use Tree::Binary; my $tree = Tree::Binary->new("*") ->setLeft( Tree::Binary->new("+") ->setLeft(Tree::Binary->new("2"))...
15.36 KB  
Science  -  Java Decision Diagram Libraries 104
This project contains two different Binary Decision Diagrams (BDD) libraries: JBDD: a Java interface to two popular BDD libraries, CUDD and BuDDy. JDD: a native Java library supporting BDD, Z-BDD and more (graph/automata/Petri nets/SAT)
320.49 KB  
Libraries  -  Search::Binary 0.95
Search::Binary is a Perl module for generic binary search. SYNOPSIS use Seach::Binary; $pos = binary_search($min, $max, $val, $read, $handle, [$size]); binary_search implements a generic binary search algorithm returning the position of the...
2.05 KB  
Libraries  -  Parse::Binary::FixedFormat::Variants 0.10
Parse::Binary::FixedFormat::Variants is a Perl module to convert between variant records and hashes. Parse::Binary::FixedFormat supports variant record formats. To describe a variant structure, pass a hash reference containing the following...
31.74 KB  
Libraries  -  List::Search 0.3
List::Search is a Perl module for fast searching of sorted lists. SYNOPSIS use List::Search qw( list_search nlist_search custom_list_search ); # Create a list to search my @list = sort qw( bravo charlie delta ); # Search for a value,...
5.12 KB  
Libraries  -  WWW::Search::Nomade 1.3
WWW::Search::Nomade is a Perl class for searching Nomade. SYNOPSIS use WWW::Search; my $oSearch = new WWW::Search(Nomade); $oSearch->maximum_to_retrieve(100); #$oSearch ->{_debug}=1; # Create request...
4.1 KB  
Libraries  -  Search::Xapian 1.0.2.0
Search::Xapian is a Perl XS frontend to the Xapian C++ search library. The project is a fairly complete wrapper: most features of the Xapian library are made available for use from Perl. Xapian is a highly adaptable toolkit that allows...
35.84 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB