networks, tbn->network: Add tests for SBN.

This commit is contained in:
Sergiu Ivanov 2020-10-17 00:55:20 +02:00
parent 218ecfc009
commit 7555db41ef

View File

@ -1280,4 +1280,11 @@
(define n (tbn->network tbn))
(define s1 (make-state '((a . 0) (b . 0))))
(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))))))