Changeset 35023 in project


Ignore:
Timestamp:
01/15/18 18:10:50 (9 months ago)
Author:
kon
Message:

reflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/bloom-filter/trunk/bloom-filter.scm

    r35022 r35023  
    2121
    2222(;export
     23  ;
    2324  optimum-size
    2425  optimum-k
     
    2829  desired-m
    2930  actual-k
     31  ;
    3032  make-bloom-filter
    3133  bloom-filter? check-bloom-filter error-bloom-filter
     
    145147        (message-digest-primitive-digest-length mdp)
    146148        (unsigned-native-integer-size)) ) )
    147     ;Returns a list of hash values for the supplied object
     149    ;returns a list of hash values for the supplied object
    148150    (lambda (obj ls)
    149151      (message-digest-result->integers
     
    219221;( p n mdps) | ( m mdps [k])
    220222(define (make-bloom-filter m mdps #!optional des-k)
    221   ;Process paramter list variant
     223  ;processing ( m mdps [k] ) or ( p n mdps ) ?
    222224  (if (list? mdps)
    223225    (check-positive-fixnum 'make-bloom-filter m 'm)
     
    225227      (p m)
    226228      (n mdps) )
    227       (check-flonum 'make-bloom-filter p 'p)
    228       (check-open-interval 'make-bloom-filter p 0.0 1.0 'p)
     229      (check-open-interval 'make-bloom-filter (check-flonum 'make-bloom-filter p 'p) 0.0 1.0 'p)
    229230      (check-positive-fixnum 'make-bloom-filter n 'n)
    230231      (set! mdps des-k)
    231232      (set!-values (m des-k) (optimum-size p n)) ) )
     233  ;
    232234  (for-each
    233235    (cut check-message-digest-primitive 'make-bloom-filter <>)
    234236    (check-list 'make-bloom-filter mdps 'mdps))
    235   ;Get the "desired" # of hash values (k)
     237  ;get the "desired" # of hash values (k)
    236238  (let ((act-k (actual-k mdps)))
    237239    (if (not des-k)
     
    240242        ;FIXME tell them how !
    241243        (error 'make-bloom-filter "insufficient hash functions supplied" act-k des-k) ) ) )
    242   ;Bloom filter is a multi-hash into a bitvector
     244  ;bloom filter is a multi-hash into a bitvector
    243245  (%make-bloom-filter
    244246    0 m des-k
Note: See TracChangeset for help on using the changeset viewer.