Changeset 9372 in project


Ignore:
Timestamp:
03/09/08 16:30:14 (12 years ago)
Author:
Kon Lovett
Message:

Proper way to "hide" unreleased.

Location:
release/3/dictionary/trunk
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/dictionary/trunk/dictionary.scm

    r8299 r9372  
    6868  #:initial           Value to use when default not supplied
    6969  #:equivalence       Equality test
    70   #:compare           Comparison test - < negative, = zero, > positive
     70  #:comparison        3 way test - < negative, = zero, > positive
    7171  #:min-size          Lower bound for size - actual could be less
    7272  #:max-size          Upper bound for size - actual could be more
     
    7575  #:implementation    Force an implementation
    7676
    77   equivalence & compare are mutually exclusive
     77  equivalence & comparison are mutually exclusive
    7878 
    7979  equivalence implies unsorted
    8080 
    81   compare implies sorted
     81  comparison implies sorted
    8282 
    8383|#
     
    106106
    107107(make-inline-unchecked-record-type dictionary
    108   (%make-dictionary mnsz mzsz spcf timf eqvp cmpp)
     108
     109  (%make-dictionary mnsz mzsz spcf timf eqvp cmpp )
     110
    109111  %dictionary?
    110112
     113  ;; Public Properties
     114  (mnsz %dictionary-min-size %dictionary-min-size-set!)
     115  (mxsz %dictionary-max-size %dictionary-max-size-set!)
     116  (spcf %dictionary-space? %dictionary-space?-set!)
     117  (timf %dictionary-time? %dictionary-time?-set!)
     118  (eqvp %dictionary-equivalence-function %dictionary-equivalence-function-set!)
     119  (cmpp %dictionary-comparison-function %dictionary-comparison-function-set!)
     120
     121  ;; Implementation
    111122  (data %dictionary-data %dictionary-data-set!)
    112123
    113   (sizp %dictionary-size-procedure %dictionary-size-set!)
     124  (sizp %dictionary-size %dictionary-size-set!)
    114125  (refp %dictionary-ref %dictionary-ref-set!)
    115126  (extp %dictionary-exists? %dictionary-exists?-set!)
     
    123134  (2wtp %dictionary->wt-tree %dictionary->wt-tree-set!)
    124135
    125   (kysp %dictionary-keys-procedure %dictionary-keys-procedure-set!)
    126   (valsp %dictionary-values-procedure %dictionary-values-procedure-set!)
    127  
    128   ( $dictionary-min-size-changed-procedure)
    129  
    130   (mnsz %dictionary-min-size %dictionary-min-size-set!)
    131   (mxsz %dictionary-max-size %dictionary-max-size-set!)
    132   (spcf %dictionary-space? %dictionary-space?-set!)
    133   (timf %dictionary-time? %dictionary-time?-set!)
    134   (eqvp %dictionary-equivalence-function %dictionary-equivalence-function-set!)
    135   (cmpp %dictionary-compare-function %dictionary-compare-function-set!) )
     136  (al2p %alist->dictionary %alist->dictionary-set!)
     137  (pl2p %plist->dictionary %plist->dictionary-set!)
     138  (dl2p %dlist->dictionary %dlist->dictionary-set!)
     139  (ht2p %hash-table->dictionary %hash-table->dictionary-set!)
     140  (rb2p %rb-tree->dictionary %rb-tree->dictionary-set!)
     141  (wt2p %wt-tree->dictionary %wt-tree->dictionary-set!)
     142
     143  (kysp %dictionary-keys %dictionary-keys-set!)
     144  (valsp %dictionary-values %dictionary-values-set!)
     145 
     146  (eqfnchgd %dictionary-equivalence-function-changed %dictionary-equivalence-function-changed-set!)
     147  (compchgd %dictionary-comparison-function-changed %dictionary-comparison-function-changed-set!)
     148  (mnszchgd %dictionary-min-size-changed %dictionary-min-size-changed-set!)
     149  (mxszchgd %dictionary-max-size-changed %dictionary-max-size-changed-set!)
     150  (timechgd %dictionary-time?-changed %dictionary-time?-changed-set!)
     151  (spacchgd %dictionary-space?-changed %dictionary-space?-changed-set!)
     152  (implchgd %dictionary-implementation-changed %dictionary-implementation-changed-set!)
     153   )
     154
     155;;; Predicates
    136156
    137157;;
     
    140160        (%dictionary? obj) )
    141161
    142 ;;;
     162;;
     163
     164(define (dictionary-=? dict ...)
     165        )
     166
     167;;; Properties
    143168
    144169;;
    145170
    146171(define (dictionary-size dict)
    147         ((%dictionary-size-procedure dict) (%dictionary-data dict)) )
     172        ((%dictionary-size dict) (%dictionary-data dict)) )
    148173
    149174;;
    150175
    151176(define (dictionary-keys dict)
    152         ((%dictionary-keys-procedure dict) (%dictionary-data dict)))
     177        ((%dictionary-keys dict) (%dictionary-data dict)))
    153178
    154179;;
    155180
    156181(define (dictionary-values dict)
    157         ((%dictionary-values-procedure dict) (%dictionary-data dict)))
    158 
    159 ;;;
     182        ((%dictionary-values dict) (%dictionary-data dict)))
    160183
    161184;;
     
    176199;;
    177200
    178 (define (dictionary-compare-function dict)
     201(define (dictionary-comparison-function dict)
    179202        (%dictionary-equivalence-function dict) )
    180203
     
    193216(define (dictionary-implementation dict)
    194217        )
    195 
    196 ;;;
    197218
    198219;;
     
    201222  (check-exact dictionary-min-size-set!' siz)
    202223        (%dictionary-min-size-set! dict siz)
    203         ((%dictionary-min-size-changed-procedure dict) dict) )
     224        ((%dictionary-min-size-changed dict) dict) )
    204225
    205226;;
     
    208229  (check-exact dictionary-min-size-set!' siz)
    209230        (%dictionary-max-size-set! dict siz)
    210         ((%dictionary-max-size-changed-procedure dict) dict) )
     231        ((%dictionary-max-size-changed dict) dict) )
    211232
    212233;;
     
    215236  (check-procedure dictionary-equivalence-function-set!' proc)
    216237        (%dictionary-equivalence-function-set! dict proc)
    217         ((%dictionary-equivalence-function-changed-procedure dict) dict) )
    218 
    219 ;;
    220 
    221 (define (dictionary-compare-function-set! dict proc)
    222   (check-procedure dictionary-compare-function-set!' proc)
    223         (%dictionary-compare-function-set! dict proc)
    224         ((%dictionary-compare-function-changed-procedure dict) dict) )
     238        ((%dictionary-equivalence-function-changed dict) dict) )
     239
     240;;
     241
     242(define (dictionary-comparison-function-set! dict proc)
     243  (check-procedure dictionary-comparison-function-set!' proc)
     244        (%dictionary-comparison-function-set! dict proc)
     245        ((%dictionary-comparison-function-changed dict) dict) )
    225246
    226247;;
     
    228249(define (dictionary-space?-set! dict flag)
    229250        (%dictionary-space?-set! dict flag)
    230         ((%dictionary-space?-changed-procedure dict) dict) )
     251        ((%dictionary-space?-changed dict) dict) )
    231252
    232253;;
     
    234255(define (dictionary-time?-set! dict flag)
    235256        (%dictionary-time?-set! dict siz)
    236         ((%dictionary-time?-changed-procedure dict) dict) )
     257        ((%dictionary-time?-changed dict) dict) )
    237258
    238259;;
     
    241262        )
    242263
    243 ;;;
    244 
    245 ;;
    246 
    247 (define (make-dictionary #:initial #:equivalence #:compare #:min-size #:max-size #:space? #:time? #:implementation)
    248         )
    249 
    250 ;;;
     264;;; Constructor
     265
     266;;
     267
     268(define (make-dictionary #:initial #:equivalence #:comparison #:min-size #:max-size #:space? #:time? #:implementation)
     269        )
     270
     271;;; Constructor from Specified Type
    251272
    252273;;
     
    257278;;
    258279
    259 (define (plist->dictionary plist #:initial #:equivalence #:compare #:min-size #:max-size #:space? #:time? #:implementation)
    260         )
    261 
    262 ;;
    263 
    264 (define (dlist->dictionary keys values #:initial #:equivalence #:compare #:min-size #:max-size #:space? #:time? #:implementation)
    265         )
    266 
    267 ;;
    268 
    269 (define (hash-table->dictionary table #:initial #:equivalence #:compare #:min-size #:max-size #:space? #:time? #:implementation)
    270         )
    271 
    272 ;;
    273 
    274 (define (rb-tree->dictionary tree #:initial #:equivalence #:compare #:min-size #:max-size #:space? #:time? #:implementation)
    275         )
    276 
    277 ;;
    278 
    279 (define (wt-tree->dictionary tree #:initial #:equivalence #:compare #:min-size #:max-size #:space? #:time? #:implementation)
    280         )
    281 
    282 ;;;
    283 
    284 ;;
    285 
    286 (define (->dictionary object #:initial #:equivalence #:compare #:min-size #:max-size #:space? #:time? #:implementation)
    287         )
    288 
    289 ;;;
     280(define (plist->dictionary plist #:initial #:equivalence #:comparison #:min-size #:max-size #:space? #:time? #:implementation)
     281        )
     282
     283;;
     284
     285(define (dlist->dictionary keys values #:initial #:equivalence #:comparison #:min-size #:max-size #:space? #:time? #:implementation)
     286        )
     287
     288;;
     289
     290(define (hash-table->dictionary table #:initial #:equivalence #:comparison #:min-size #:max-size #:space? #:time? #:implementation)
     291        )
     292
     293;;
     294
     295(define (rb-tree->dictionary tree #:initial #:equivalence #:comparison #:min-size #:max-size #:space? #:time? #:implementation)
     296        )
     297
     298;;
     299
     300(define (wt-tree->dictionary tree #:initial #:equivalence #:comparison #:min-size #:max-size #:space? #:time? #:implementation)
     301        )
     302
     303;;; Universal Constructor
     304
     305;;
     306
     307(define (->dictionary object #:initial #:equivalence #:comparison #:min-size #:max-size #:space? #:time? #:implementation)
     308        )
     309
     310;;; Conversion
    290311
    291312;;
     
    319340        )
    320341
    321 ;;;
     342;;; Reference
    322343
    323344;;
     
    331352        )
    332353
    333 ;;;
     354;;; Update
     355
     356;;
     357
     358(define (dictionary-set! dict key value)
     359        )
     360
     361;;
     362
     363(define (dictionary-update! dict key [default-proc [update-proc]])
     364        )
     365
     366;;; Deletion
     367
     368;;
     369
     370(define (dictionary-delete! dict key)
     371        )
     372
     373(define (dictionary-remove! dict search-proc)
     374        )
     375
     376;;; Partitioning
    334377
    335378;;
     
    353396        )
    354397
    355 ;;;
    356 
    357 ;;
    358 
    359 (define (dictionary-set! dict key value)
    360         )
    361 
    362 ;;;
    363 
    364 ;;
    365 
    366 (define (dictionary-update! dict key [default-proc [update-proc]])
    367         )
    368 
    369 ;;;
    370 
    371 ;;
    372 
    373 (define (dictionary-delete! dict key)
    374         )
    375 
    376 ;;;
     398;;; Merging
     399
     400;;
     401
     402(define (dictionary-merge! merge-proc dict ...)
     403        )
     404
     405(define (dictionary-merge merge-proc dict ...)
     406        )
     407
     408;;; Mapping Operations
     409
     410;;
     411
     412(define (dictionary-fold fold-proc init dict ...)
     413        )
     414
     415;;
     416
     417(define (dictionary-map map-proc dict ...)
     418        )
     419
     420;;
     421
     422(define (dictionary-for-each for-each-proc dict ...)
     423        )
     424
     425;;
     426
     427(define (dictionary-search search-proc dict ...)
     428        )
     429
     430;;; Set Operations
    377431
    378432;;
     
    386440        )
    387441
    388 ;;;
    389 
    390 ;;
    391 
    392 (define (dictionary-=? dict ...)
    393         )
    394 
    395 ;;;
    396 
    397 ;;
    398 
    399 (define (dictionary-merge! merge-proc dict ...)
    400         )
    401 
    402 ;;;
    403 
    404442;;
    405443
     
    416454(define (dictionary-difference dict ...)
    417455        )
    418 
    419 ;;;
    420 
    421 ;;
    422 
    423 (define (dictionary-fold fold-proc init dict ...)
    424         )
    425 
    426 ;;
    427 
    428 (define (dictionary-map map-proc dict ...)
    429         )
    430 
    431 ;;
    432 
    433 (define (dictionary-for-each for-each-proc dict ...)
    434         )
    435 
    436 ;;
    437 
    438 (define (dictionary-search search-proc dict ...)
    439         )
    440 
Note: See TracChangeset for help on using the changeset viewer.