Changeset 38477 in project for release/5


Ignore:
Timestamp:
04/01/20 04:34:22 (16 months ago)
Author:
Kon Lovett
Message:

updae comment, appropriate optimization with rt type-checks, add check-sequence

Location:
release/5/levenshtein/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • release/5/levenshtein/trunk/levenshtein-sequence-functor.scm

    r38328 r38477  
    4444
    4545  ; Validate
     46  (check-sequence 'levenshtein-distance/generic-sequence source)
     47  (check-sequence 'levenshtein-distance/generic-sequence target)
    4648  (check-procedure 'levenshtein-distance/generic-sequence elm-eql "elm-eql")
    4749  (check-procedure 'levenshtein-distance/generic-sequence get-work-vector "get-work-vector")
  • release/5/levenshtein/trunk/levenshtein-sequence-interface.scm

    r38328 r38477  
    88
    99(define-interface SEQUENCE-OPER (
     10  check-sequence              ;* -> sequence
    1011  sequence-length             ;sequence -> number
    1112  sequence-prefix-length      ;procedure sequence sequence #!rest sequence -> number
  • release/5/levenshtein/trunk/levenshtein-sequence-string.scm

    r38328 r38477  
    1515(import type-errors)
    1616
     17(: check-sequence (symbol * #!optional (or symbol string) -> sequence))
    1718(: sequence-length (sequence -> number))
    1819(: sequence-prefix-length (procedure sequence sequence #!rest sequence -> number))
     
    2223
    2324;;;
     25
     26(define check-sequence check-string)
    2427
    2528(define sequence-length string-length)
  • release/5/levenshtein/trunk/levenshtein-sequence-utf8.scm

    r38328 r38477  
    1616(import type-errors)
    1717
     18(: check-sequence (symbol * #!optional (or symbol string) -> sequence))
    1819(: sequence-length (sequence -> number))
    1920(: sequence-prefix-length (procedure sequence sequence #!rest sequence -> number))
     
    2324
    2425;;;
     26
     27(define check-sequence check-string)
    2528
    2629(define sequence-length string-length)
  • release/5/levenshtein/trunk/levenshtein-sequence-vector.scm

    r38328 r38477  
    1616(import type-errors)
    1717
     18(: check-sequence (symbol * #!optional (or symbol string) -> sequence))
    1819(: sequence-length (sequence -> number))
    1920(: sequence-prefix-length (procedure sequence sequence #!rest sequence -> number))
     
    5051(define (check-*vector loc obj)
    5152  (unless (*vector? obj)
    52     (error/type/vector loc obj)) )
     53    (error/type/vector loc obj))
     54  obj )
    5355
    5456;;;
     
    7779        ((<= end i))
    7880      (f i (*vector-ref vec i)) ) )
    79   (check-procedure 'vector-for-each f)
    80   (check-*vector 'vector-for-each vec)
    8181  (if (null? vectors)
    8282      (vec-for-each f vec 0 (*vector-length vec))
     
    8484
    8585(define (subvector/shared vec start #!optional (end (*vector-length vec)))
    86   (check-vector 'subvector/shared vec)
    8786  (%make-shared-vector vec start end) )
    8887
    8988(define (vector-prefix-length elm-eql v1 v2
    9089          #!optional (s1 0) (e1 (*vector-length v1)) (s2 0) (e2 (*vector-length v2)))
    91   (check-*vector 'vector-prefix-length v1)
    92   (check-*vector 'vector-prefix-length v2)
    9390  (let loop ((i1 s1) (i2 s2))
    9491    (cond
     
    10299(define (vector-suffix-length elm-eql v1 v2
    103100          #!optional (s1 0) (e1 (*vector-length v1)) (s2 0) (e2 (*vector-length v2)))
    104   (check-*vector 'vector-suffix-length v1)
    105   (check-*vector 'vector-suffix-length v2)
    106101  (let loop ((i1 (-- e1)) (i2 (-- e2)))
    107102    (cond
     
    115110;;;
    116111
     112(define check-sequence check-*vector)
    117113(define sequence-length *vector-length)
    118114(define sequence-prefix-length vector-prefix-length)
  • release/5/levenshtein/trunk/levenshtein.egg

    r38357 r38477  
    33
    44( (synopsis "Levenshtein edit distance")
    5   (version "2.0.2")
     5  (version "2.0.3")
    66  (category data)
    77        (author "[[kon lovett]]")
     
    3535      (types-file)
    3636      (component-dependencies levenshtein-operators)
    37       (csc-options "-O3" "-d1" "-local" "-no-procedure-checks") )
     37      (csc-options "-O3" "-d1" "-local" "-no-procedure-checks" "-no-bound-checks") )
    3838   (extension levenshtein-path-iterator
    3939      (types-file)
    40       (csc-options "-O3" "-d1" "-local" "-no-procedure-checks") )
     40      (csc-options "-O3" "-d1" "-local" "-no-procedure-checks" "-no-bound-checks") )
    4141   (extension levenshtein-print
    4242      (types-file)
    4343      (component-dependencies levenshtein-operators)
    44       (csc-options "-O3" "-d1" "-local" "-no-procedure-checks") )
     44      (csc-options "-O3" "-d1" "-local" "-no-procedure-checks" "-no-bound-checks") )
    4545   (extension levenshtein-vector-functor
    4646      (types-file)
    47       (csc-options "-O3" "-d1" "-local" "-no-procedure-checks") )
     47      (csc-options "-O3" "-d1" "-local" "-no-procedure-checks" "-no-bound-checks") )
    4848   (extension levenshtein-sequence-functor
    4949      (types-file)
    50       (csc-options "-O3" "-d1" "-local" "-no-procedure-checks") )
     50      (csc-options "-O3" "-d1" "-local" "-no-procedure-checks" "-no-bound-checks") )
    5151   (extension levenshtein-byte
    5252      (types-file)
    53       (csc-options "-O3" "-d1" "-local" "-no-procedure-checks") )
     53      (csc-options "-O3" "-d1" "-local" "-no-procedure-checks" "-no-bound-checks") )
    5454   (extension levenshtein-transpose-byte
    5555      (types-file)
    56       (csc-options "-O3" "-d1" "-local" "-no-procedure-checks") )
     56      (csc-options "-O3" "-d1" "-local" "-no-procedure-checks" "-no-bound-checks") )
    5757   (extension levenshtein-sequence-functor
    5858      (types-file)
    5959      #;(component-dependencies levenshtein-sequence levenshtein-cost)
    60       (csc-options "-O3" "-d1" "-local" "-no-procedure-checks") ) ) )
     60      (csc-options "-O3" "-d1" "-local" "-no-procedure-checks" "-no-bound-checks") ) ) )
  • release/5/levenshtein/trunk/tests/run.scm

    r38328 r38477  
    33(import scheme)
    44
    5 ;;; Create Time Const
     5;;; Create Egg Const
    66
    77(define EGG-NAME "levenshtein")
Note: See TracChangeset for help on using the changeset viewer.