Ignore:
Timestamp:
May 16, 2012, 3:02:58 PM (7 years ago)
Author:
ksherdy
Message:

Added bit / byte strategy. Added length test to hash table.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/symbol_table/bit_byte_group_strms.py

    r2103 r2106  
    55        starts = 0
    66        follows = 0
    7         follows_0 = 0
     7        follows_7 = 0 # bit
     8        follows_0 = 0 # byte
    89
    910def Gen_lgth_groups(groups):
    10         groups.follows_0 = groups.follows
     11
     12        # Groups symbols of length 1 to length 7
     13
     14        follows_gt_0 = groups.follows
     15
     16        follows_mask_1_2 = pablo.Advance(groups.starts) | pablo.Advance(pablo.Advance(groups.starts))
     17
     18        follows_mask_3_4 = pablo.Advance(pablo.Advance(follows_mask_1_2))
     19        follows_mask_5_6 = pablo.Advance(pablo.Advance(follows_mask_3_4))
     20        follows_mask_6_7 = pablo.Advance(follows_mask_5_6)
     21        follows_mask_1_7 = follows_mask_1_2 | follows_mask_3_4 | follows_mask_5_6 | follows_mask_6_7
     22
     23        # Naive Advance
     24        groups.follows_7 = follows_gt_0 & follows_mask_1_7
     25
     26        # Advance 32 and Interpose
     27        #temp32 = pablo.Advance32 (follows_mask_1_7)
     28        #groups.follows_16 = follows_gt_8 & interpose32 (follows_mask_1_7, temp32, 7)
     29
     30        follows_gt_7 = follows_gt_0 &~ groups.follows_7
     31
     32        # Groups symbols of length greater than 7
     33        groups.follows_0 = follows_gt_7
     34
    1135
    1236def Main(groups):
Note: See TracChangeset for help on using the changeset viewer.