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.990.461 Times

Tree::BPTree 1.07

  Date Added: April 01, 2010  |  Visits: 647

Tree::BPTree

Report Broken Link
Printer Friendly Version


Product Homepage
Download (75 downloads)

Tree::BPTree is a Perl implementation of B+ trees. SYNOPSIS use Tree::BPTree; # These arguments are actually the defaults my $tree = new Tree::BPTree( -n => 3, -unique => 0, -keycmp => sub { $_[0] cmp $_[1] }, -valuecmp => sub { $_[0] <=> $_[1] }, ); # index the entries in this string: my $string = "THERES MORE THAN ONE WAY TO DO IT"; # TMTOWTDI my $i = 0; $tree->insert($_, $i++) foreach (split //, $string); # find the index of the first T my $t = $tree->find(T); # find the indexes of every T my @t = $tree->find(T); # We dont like the word WAY , so lets remove it my $i = index $string, W; $tree->delete($_, $i++) foreach (split //, substr($string, $i, 4)); # Reverse the sort order $tree->reverse; # Iterate through each key/value pair just like built-in each operator while (my ($key, $value) = $tree->each) { print "$key => $valuen"; } # Reset the iterator when we quit from an "each-loop" early $tree->reset; # You might also be interested in using multiple each loops at once, which is # possible through the cursor syntax. You can even delete individual pairs # from the list during iteration. my $cursor = $tree->new_cursor; while (my ($key, $value) = $cursor->each) { my $nested = $tree->new_cursor; while (my ($nkey, $nvalue) = $nested->each) { if ($key->shouldnt_be_in_this_tree_with($nkey)) { $nested->delete; } } } # Iterate using an iterator subroutine $tree->iterate(sub { print "$_[0] => $_[1]n" }); # Iterate using an iterator subroutine that returns the list of return values # returned by the iterator print join(, , $tree->map(sub { "$_[0] => $_[1]" })),"n"; # Grep-like operations my @pairs = $tree->grep (sub { $_[0] =~ /S/ }); my @keys = $tree->grep_keys (sub { $_[0] =~ /S/ }); my @values = $tree->grep_values (sub { $_[0] =~ /S/ }); # Get all keys, values my @all_keys = $tree->keys; my @all_values = $tree->values; # Clear it out and start over $tree->clear; B+ trees are balanced trees which provide an ordered map from keys to values. They are useful for indexing large bodies of data. They are similar to 2-3-4 Trees and Red-Black Trees. This implementation supports B+ trees using an arbitrary n value..

Requirements: No special requirements
Platforms: Linux
Keyword: Bptree Keys Libraries Programming Sub Treebptree Trees Values
Users rating: 0/10

License: Freeware Size: 17.41 KB
TREE::BPTREE RELATED
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  
Libraries  -  Sub::PatMat 0.01
Sub::PatMat can call a version of subroutine depending on its arguments. SYNOPSIS use Sub::PatMat; # basics: sub fact : when($_[0] <= 1) { 1 } sub fact { my ($n) = @_; $n*fact($n-1) } print fact(6); # referring to things other than @_:...
14.34 KB  
Libraries  -  Adobe Source Libraries 1.0.29
The Adobe Source Libraries (ASL) are a collection of C++ libraries building foundation technology to allow the construction of commercial applications by assembling generic algorithms through declarative descriptions. Whats New in This Release:...
8.2 MB  
Libraries  -  Sub::DeferredPartial 0.01
Sub::DeferredPartial is a deferred evaluation / partial application. SYNOPSIS use Sub::DeferredPartial def; $S = def sub : P1 P2 P3 { %_=@_; join , @_{qw(P1 P2 P3)} }; print $S->( P1 => 1, P2 => 2, P3 => 3 )->(); # 123 $A = $S->( P3 => 1...
5.12 KB  
Libraries  -  strhash 0.6.0
strhash is a hash table library. A strhash is an associative array, mapping keys to values. Keys and values may be strings of up to 2 gigabytes (2^31) bytes of length, containing any possibly character. Keys need not be unique. All hashing...
32.77 KB  
Libraries  -  Template::Tools::ttree 2.19
Template::Tools::ttree module can process entire directory trees of templates. SYNOPSIS ttree [options] [files] The ttree script is used to process entire directory trees containing template files. The resulting output from processing each...
768 KB  
Libraries  -  Tie::ListKeyedHash 1.02
Tie::ListKeyedHash is a system allowing the use of anonymous arrays as keys to a hash. SYNOPSIS use Tie::ListKeyedHash; [$X =] tie %hash, Tie::ListKeyedHash; my $live_key = [key,items,live]; $hash{$live_key} = Hello!;...
16.38 KB  
Libraries  -  Template::Magic 1.39
Template::Magic is a Perl module for magic merger of runtime values with templates. SYNOPSIS Just add these 2 magic lines to your code... use Template::Magic; Template::Magic->new->print( /path/to/template ); to have all your variable and...
46.08 KB  
Libraries  -  GNU Classpath 0.95
GNU Classpath (essential libraries for Java) is a project to create free core class libraries for use with virtual machines and compilers for the Java programming language. GNU Classpath project includes all native methods and core classes...
6.5 MB  
Libraries  -  Class::Declare 0.08
Class::Declare is a Perl module created to declare classes with public, private and protected attributes and methods. SYNOPSIS package My::Class; use strict; use warnings; use base qw( Class::Declare ); __PACKAGE__->declare( public =>...
76.8 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  -  wolfSSL 3.12.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...
2.73 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