Help for this page

Select Code to Download


  1. or download this
    # Create the bit vectors
    my $bv1 = Bit::Vector->new(50);
    ...
    
    # Add these arrays to a single, global array
    my @sources :shared = (\@source1, \@source2, ...);
    
  2. or download this
    # One pairwise intersection:
    # $intrx1_2 is a bit vector whose bits correspond to the positions
    # in @source1 whose bit vectors intersected with those in @source2;
    ...
    # Storing the results in a globally shared hash
    $globally_shared_hash{$source1}->{$target2} = $intrx1_2;
    $globally_shared_hash{$source2}->{$target1} = $intrx2_1;
    
  3. or download this
       %globally_shared_hash = (
           $source1 => { $target2 => $bv1_2,
                         $target3 => $bv1_3,
    ...
                     },
            ...
       );
    
  4. or download this
    Bit::Vector->new()              # bv constructor
    $vec->to_Hex()                  # bv -> HEX string
    $vec->to_Bin()                  # bv -> BINARY string
    ...
    $vec->Bit_Off($index)           # turn bit off
    $vec->Interval_Scan_dec         # grabs (min,max) of next chunk of 0's
    $vec->Lexicompare($vec2)        # +1,0, or -1