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

Tree::BPTree 1.07

  Date Added: April 01, 2010  |  Visits: 970

Tree::BPTree

Report Broken Link
Printer Friendly Version


Product Homepage
Download (92 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
USER REVIEWS
More Reviews or Write Review


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  -  Sub::Curry 0.8
Sub::Curry is a Perl module to create curried subroutines. SYNOPSIS use Sub::Curry; use Sub::Curry qw/ :CONST curry /; # Import spice constants # and the &curry function. #my $f1 = Sub::Curry::->new(&foo, 1, 2); # Same as below. my $f1 =...
6.14 KB  
Libraries  -  Sub::Slice::Manual 1.048
Sub::Slice::Manual is a Perl module with user guide for Sub::Slice. USING Sub::Slice Sub::Slice is a way of breaking down a long-running process and maintaining state across a stateless protocol. This allows the client to draw a progress bar...
27.65 KB  
Libraries  -  Sub::Timebound 1.01
Sub::Timebound is a Perl extension for timebound computations. SYNOPSIS use Sub::Timebound; sub fun { my $i = shift; if ($i =~ /7$/) { die "Simulated internal errorn"; } while ($i) { $i--; } return "All is well"; } my $x =...
4.1 KB  
Libraries  -  Sub::Assert 1.22
Sub::Assert - Design-by-contract like pre- and postconditions, etc. SYNOPSIS use Sub::Assert; sub squareroot { my $x = shift; return $x**0.5; } assert pre => $PARAM[0] >= 1, # for the sake of simplicity post => $VOID or $RETURN <=...
6.14 KB  
Libraries  -  Sub::Quotelike 0.03
Sub::Quotelike is a Perl module that allows to define quotelike functions. SYNOPSIS use Sub::Quotelike; sub myq () { my $s = shift; # Do something with $s... return $s; } sub myqq (") { my $s = shift; # Do something with $s......
4.1 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  
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