networks, tbn->network: Add tests for SBN.
This commit is contained in:
parent
218ecfc009
commit
7555db41ef
1 changed files with 7 additions and 0 deletions
|
@ -1280,4 +1280,11 @@
|
||||||
(define n (tbn->network tbn))
|
(define n (tbn->network tbn))
|
||||||
(define s1 (make-state '((a . 0) (b . 0))))
|
(define s1 (make-state '((a . 0) (b . 0))))
|
||||||
(check-equal? (update n s1 '(a b))
|
(check-equal? (update n s1 '(a b))
|
||||||
|
(make-state '((a . 0) (b . 1))))
|
||||||
|
|
||||||
|
(define sbn (make-sbn `((a . ,(make-sbf/state '((b . -1))))
|
||||||
|
(b . ,(make-sbf/state '((a . 1)))))))
|
||||||
|
(define sn (tbn->network sbn))
|
||||||
|
(define s2 (make-state '((a . 1) (b . 1))))
|
||||||
|
(check-equal? (update sn s2 '(a b))
|
||||||
(make-state '((a . 0) (b . 1))))))
|
(make-state '((a . 0) (b . 1))))))
|
||||||
|
|
Loading…
Reference in a new issue