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 exploiting the Monastery: (16)
As of 2015-07-30 16:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (273 votes), past polls