networks: Export and test boolean-power-n.
This commit is contained in:
parent
34fbc516e2
commit
36c26d2a1f
2 changed files with 2 additions and 0 deletions
|
@ -215,6 +215,7 @@
|
||||||
'((#f #f #f) (#f #t #f) (#t #f #f) (#t #t #t)))
|
'((#f #f #f) (#f #t #f) (#t #f #f) (#t #t #t)))
|
||||||
(check-equal? (tabulate/boolean (lambda (x y) (and x y)))
|
(check-equal? (tabulate/boolean (lambda (x y) (and x y)))
|
||||||
'((#f #f #f) (#f #t #f) (#t #f #f) (#t #t #t)))
|
'((#f #f #f) (#f #t #f) (#t #f #f) (#t #t #t)))
|
||||||
|
(check-equal? (boolean-power-n 2) '((#f #f) (#f #t) (#t #f) (#t #t)))
|
||||||
(let ([negation (table->function '((#t #f) (#f #t)))]
|
(let ([negation (table->function '((#t #f) (#f #t)))]
|
||||||
[negation/list (table->function/list '((#t #f) (#f #t)))])
|
[negation/list (table->function/list '((#t #f) (#f #t)))])
|
||||||
(check-true (negation #f)) (check-false (negation #t))
|
(check-true (negation #f)) (check-false (negation #t))
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
[tabulate/boolean (-> procedure-fixed-arity? (listof (listof boolean?)))]
|
[tabulate/boolean (-> procedure-fixed-arity? (listof (listof boolean?)))]
|
||||||
[table->function (-> (listof (*list/c any/c any/c)) procedure?)]
|
[table->function (-> (listof (*list/c any/c any/c)) procedure?)]
|
||||||
[table->function/list (-> (listof (*list/c any/c any/c)) procedure?)]
|
[table->function/list (-> (listof (*list/c any/c any/c)) procedure?)]
|
||||||
|
[boolean-power-n (-> number? (listof (listof boolean?)))]
|
||||||
[enumerate-boolean-tables (-> number? (stream/c (listof (*list/c any/c any/c))))]
|
[enumerate-boolean-tables (-> number? (stream/c (listof (*list/c any/c any/c))))]
|
||||||
[enumerate-boolean-functions (-> number? (stream/c procedure?))]
|
[enumerate-boolean-functions (-> number? (stream/c procedure?))]
|
||||||
[enumerate-boolean-functions/list (-> number? (stream/c procedure?))])
|
[enumerate-boolean-functions/list (-> number? (stream/c procedure?))])
|
||||||
|
|
Loading…
Reference in a new issue