networks,tabulate-state*,tabulate-state*/boolean: Move the contracts to provide.
This commit is contained in:
parent
a34b08e477
commit
f812165b39
1 changed files with 6 additions and 6 deletions
12
networks.rkt
12
networks.rkt
|
@ -62,8 +62,12 @@
|
||||||
[build-full-boolean-state-graph-annotated (-> dynamics? graph?)]
|
[build-full-boolean-state-graph-annotated (-> dynamics? graph?)]
|
||||||
[tabulate-state (->* (procedure? domain-mapping/c) (#:headers boolean?)
|
[tabulate-state (->* (procedure? domain-mapping/c) (#:headers boolean?)
|
||||||
(listof (listof any/c)))]
|
(listof (listof any/c)))]
|
||||||
|
[tabulate-state* (->* ((non-empty-listof procedure?) domain-mapping/c) (#:headers boolean?)
|
||||||
|
(listof (listof any/c)))]
|
||||||
[tabulate-state/boolean (->* (procedure? (listof variable?)) (#:headers boolean?)
|
[tabulate-state/boolean (->* (procedure? (listof variable?)) (#:headers boolean?)
|
||||||
(listof (listof any/c)))]
|
(listof (listof any/c)))]
|
||||||
|
[tabulate-state*/boolean (->* ((non-empty-listof procedure?) (listof variable?)) (#:headers boolean?)
|
||||||
|
(listof (listof any/c)))]
|
||||||
[tabulate-network (->* (network? domain-mapping/c) (#:headers boolean?)
|
[tabulate-network (->* (network? domain-mapping/c) (#:headers boolean?)
|
||||||
(listof (listof any/c)))]
|
(listof (listof any/c)))]
|
||||||
[tabulate-boolean-network (->* (network?) (#:headers boolean?)
|
[tabulate-boolean-network (->* (network?) (#:headers boolean?)
|
||||||
|
@ -739,9 +743,7 @@
|
||||||
;;; the variable names, and then contains a symbol 'fi for each of the
|
;;; the variable names, and then contains a symbol 'fi for each of the
|
||||||
;;; functions, where i is replaced by the number of the function in
|
;;; functions, where i is replaced by the number of the function in
|
||||||
;;; the list.
|
;;; the list.
|
||||||
(define/contract (tabulate-state* funcs domains #:headers [headers #t])
|
(define (tabulate-state* funcs domains #:headers [headers #t])
|
||||||
(->* ((non-empty-listof procedure?) domain-mapping/c) (#:headers boolean?)
|
|
||||||
(listof (listof any/c)))
|
|
||||||
(define tab (for/list ([st (build-all-states domains)])
|
(define tab (for/list ([st (build-all-states domains)])
|
||||||
(append (hash-map st (λ (x y) y) #t)
|
(append (hash-map st (λ (x y) y) #t)
|
||||||
(for/list ([f funcs]) (f st)))))
|
(for/list ([f funcs]) (f st)))))
|
||||||
|
@ -753,9 +755,7 @@
|
||||||
[else tab]))
|
[else tab]))
|
||||||
|
|
||||||
;;; Like tabulate-state/boolean, but takes a list of functions.
|
;;; Like tabulate-state/boolean, but takes a list of functions.
|
||||||
(define/contract (tabulate-state*/boolean funcs args #:headers [headers #t])
|
(define (tabulate-state*/boolean funcs args #:headers [headers #t])
|
||||||
(->* ((non-empty-listof procedure?) (listof variable?)) (#:headers boolean?)
|
|
||||||
(listof (listof any/c)))
|
|
||||||
(tabulate-state* funcs (make-boolean-domains args) #:headers headers))
|
(tabulate-state* funcs (make-boolean-domains args) #:headers headers))
|
||||||
|
|
||||||
(module+ test
|
(module+ test
|
||||||
|
|
Loading…
Reference in a new issue