Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Algorithm::Treap

by demerphq (Chancellor)
on Sep 07, 2003 at 15:15 UTC ( #289584=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub heap_lt { $_[1] < $_[2] };
    sub key_lt  { $_[1] lt $_[2] };
    sub key_gt  { $_[1] gt $_[2] };
    
  2. or download this
    package Algorithm::Treap;
    sub import { goto &Treap::import }
    1;
    package Treap;
    #...
    
  3. or download this
    use Algorithm::Treap;
    my $default=Treap->Tied_Hash(A => 121, B => 674, C => 970, D => 82, E 
    +=> 658, F => 957);
    $default->{D}=600;
    $default->{A}=500;
    
  4. or download this
    use Algorithm::Treap;
    my $rand=Random::Treap->Tied_Hash();
    $rand->{ja}="just another\n";
    $rand->{ph}="perl hacker\n";
    
  5. or download this
    use Algorithm::Treap IntKey =>
        #DEBUG=>1,
    ...
    $inttreap->{2}=5;
    $inttreap->{10}=5;
    print join(", ",keys %$inttreap),"\n";
    
  6. or download this
    tied(%$default)->dump_tree;
    
  7. or download this
     A=500-                     
       +--------------------+   
    ...
            B=674-               E=658-       
              +------+             +------+   
                   C=970                F=957 
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://289584]
Approved by Zaxo
Front-paged by dbwiz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2014-11-21 08:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (106 votes), past polls