Changeset 34105 in project


Ignore:
Timestamp:
05/30/17 00:11:06 (5 months ago)
Author:
kon
Message:

re-flow

Location:
release/4/bloom-filter
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/bloom-filter/tags/1.1.7/bloom-filter.meta

    r26757 r34105  
    33((egg "bloom-filter.egg")
    44 (category data)
    5  (author "[[/users/kon-lovett]]")
     5 (author "[[kon lovett]]")
    66 (license "BSD")
    77 (doc-from-wiki)
  • release/4/bloom-filter/tags/1.1.7/bloom-filter.scm

    r26586 r34105  
    8686  (let loop ((idx 0)
    8787             (ls ls))
    88     (if (fx= idx u32cnt) ls
     88    (if (fx= idx u32cnt)
     89      ls
    8990      ;Hash functions return integers, and m is a fixnum, so
    9091      ;`inexact->exact' will produce a fixnum.
     
    9495
    9596(define (make-bloom-filter-hasher mdp m)
    96   (let ((u32cnt (fx/ (message-digest-primitive-digest-length mdp)
    97                      unsigned-integer32-size)))
     97  (let ((u32cnt
     98          (fx/
     99            (message-digest-primitive-digest-length mdp)
     100            unsigned-integer32-size)))
    98101    ;Returns a list of hash values for the supplied object
    99102    (lambda (obj ls)
     
    172175(define (make-bloom-filter m mdps #!optional des-k)
    173176  ;Process paramter list variant
    174   (if (list? mdps) (check-positive-fixnum 'make-bloom-filter m 'm)
     177  (if (list? mdps)
     178    (check-positive-fixnum 'make-bloom-filter m 'm)
    175179    (let ((p m)
    176180          (n mdps))
     
    184188  ;Get the "desired" # of hash values (k)
    185189  (let ((act-k (actual-k mdps)))
    186     (if (not des-k) (set! des-k act-k)
     190    (if (not des-k)
     191      (set! des-k act-k)
    187192      (begin
    188193        (check-positive-fixnum 'make-bloom-filter des-k)
     
    218223  (check-bloom-filter 'bloom-filter-exists? bf)
    219224  (let ((bits (%bloom-filter-bits bf)))
    220     (fx= (%bloom-filter-k bf)
    221          (bloom-filter-fold
    222            bf
    223            (lambda (idx cnt) (if (bit-vector-ref bits idx) (fx+ cnt 1) cnt))
    224            0
    225            obj)) ) )
     225    (fx=
     226      (%bloom-filter-k bf)
     227      (bloom-filter-fold
     228        bf
     229        (lambda (idx cnt) (if (bit-vector-ref bits idx) (fx+ cnt 1) cnt))
     230        0
     231        obj)) ) )
    226232
    227233) ;module bloom-filter
  • release/4/bloom-filter/tags/1.1.7/bloom-filter.setup

    r26586 r34105  
    55(verify-extension-name "bloom-filter")
    66
    7 (setup-shared+static-extension-module 'bloom-filter (extension-version "1.1.6")
     7(setup-shared+static-extension-module 'bloom-filter (extension-version "1.1.7")
    88  #:inline? #t
    99  #:types? #t
     
    1111    -scrutinize
    1212    -O3 -d1
    13     -no-procedure-checks-for-toplevel-bindings -no-bound-checks))
     13    -no-procedure-checks-for-toplevel-bindings))
  • release/4/bloom-filter/trunk/bloom-filter.meta

    r26757 r34105  
    33((egg "bloom-filter.egg")
    44 (category data)
    5  (author "[[/users/kon-lovett]]")
     5 (author "[[kon lovett]]")
    66 (license "BSD")
    77 (doc-from-wiki)
  • release/4/bloom-filter/trunk/bloom-filter.scm

    r26586 r34105  
    8686  (let loop ((idx 0)
    8787             (ls ls))
    88     (if (fx= idx u32cnt) ls
     88    (if (fx= idx u32cnt)
     89      ls
    8990      ;Hash functions return integers, and m is a fixnum, so
    9091      ;`inexact->exact' will produce a fixnum.
     
    9495
    9596(define (make-bloom-filter-hasher mdp m)
    96   (let ((u32cnt (fx/ (message-digest-primitive-digest-length mdp)
    97                      unsigned-integer32-size)))
     97  (let ((u32cnt
     98          (fx/
     99            (message-digest-primitive-digest-length mdp)
     100            unsigned-integer32-size)))
    98101    ;Returns a list of hash values for the supplied object
    99102    (lambda (obj ls)
     
    172175(define (make-bloom-filter m mdps #!optional des-k)
    173176  ;Process paramter list variant
    174   (if (list? mdps) (check-positive-fixnum 'make-bloom-filter m 'm)
     177  (if (list? mdps)
     178    (check-positive-fixnum 'make-bloom-filter m 'm)
    175179    (let ((p m)
    176180          (n mdps))
     
    184188  ;Get the "desired" # of hash values (k)
    185189  (let ((act-k (actual-k mdps)))
    186     (if (not des-k) (set! des-k act-k)
     190    (if (not des-k)
     191      (set! des-k act-k)
    187192      (begin
    188193        (check-positive-fixnum 'make-bloom-filter des-k)
     
    218223  (check-bloom-filter 'bloom-filter-exists? bf)
    219224  (let ((bits (%bloom-filter-bits bf)))
    220     (fx= (%bloom-filter-k bf)
    221          (bloom-filter-fold
    222            bf
    223            (lambda (idx cnt) (if (bit-vector-ref bits idx) (fx+ cnt 1) cnt))
    224            0
    225            obj)) ) )
     225    (fx=
     226      (%bloom-filter-k bf)
     227      (bloom-filter-fold
     228        bf
     229        (lambda (idx cnt) (if (bit-vector-ref bits idx) (fx+ cnt 1) cnt))
     230        0
     231        obj)) ) )
    226232
    227233) ;module bloom-filter
  • release/4/bloom-filter/trunk/bloom-filter.setup

    r26586 r34105  
    55(verify-extension-name "bloom-filter")
    66
    7 (setup-shared+static-extension-module 'bloom-filter (extension-version "1.1.6")
     7(setup-shared+static-extension-module 'bloom-filter (extension-version "1.1.7")
    88  #:inline? #t
    99  #:types? #t
     
    1111    -scrutinize
    1212    -O3 -d1
    13     -no-procedure-checks-for-toplevel-bindings -no-bound-checks))
     13    -no-procedure-checks-for-toplevel-bindings))
Note: See TracChangeset for help on using the changeset viewer.