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

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

Serving Software Downloads in 976 Categories, Downloaded 29.547.141 Times

Tree::Binary::Search 0.07

  Date Added: October 13, 2010  |  Visits: 879

Tree::Binary::Search

Report Broken Link
Printer Friendly Version


Product Homepage
Download (232 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
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  -  Search::VectorSpace 0.02
Search::VectorSpace is a very basic vector-space search engine. SYNOPSIS use Search::VectorSpace; my @docs = ...; my $engine = Search::VectorSpace->new( docs => @docs, threshold => .04); $engine->build_index(); while ( my $query = ) {...
4.1 KB  
Libraries  -  OpenGrok 0.3
OpenGrok is a fast source code search and cross reference engine. It helps you search, cross-reference and navigate your source tree. It can understand various program file formats and version control histories like SCCS, RCS and CVS. In other...
2.9 MB  
Libraries  -  Tree::Numbered 2.02
Tree::Numbered is a thin N-ary tree structure with a unique number for each item. SYNOPSYS use Tree::Numbered; my $tree = Tree::Numbered->new(John Doe); $tree->append(John Doe Jr.); $tree->append(Marry-Jane Doe); while (my $branch =...
26.62 KB  
Database Tools  -  Binary Tree Representation 1.0
Binary Tree Representation is the nodes of a tree stored in a MySQL database is recursively traversed and their names are displayed in a HTML page.
10 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  
Finance  -  Binary Option Robot 1.9.26
Binary Options Robot Software to trade automatically the Binary Options to trade automatically the Binary Options Online. Binary Option Robot will analyse the trend of the market in real-time and will call or put at your place on the right...
13.9 MB  
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  
Libraries  -  Libkdcraw 0.1.0
Libkdcraw is a C++ interface around dcraw binary program used to decode RAW picture files. The library documentation is available on header files. Libkdcraw library is used by kipi-plugins, digiKam and others kipi host programs..
655.36 KB  
Libraries  -  LBC Libraries 0.0.7
LBC Libraries is a set of easy C libraries that provide classical data types and structures (string, hash, queue, stack, tree). LBC Libraries package is focused on simplicity and portability. It uses ANSI C (C98 standard not required), and...
57.34 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
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  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB