Add PGF.writeToFile. Add categoryProbability, but it seems pgf_category_prob always returns 0.

This commit is contained in:
John J. Camilleri
2021-09-27 11:37:52 +02:00
parent 187ded6d3d
commit 2deae9d402
5 changed files with 60 additions and 2 deletions

View File

@@ -36,6 +36,8 @@ main = do
,TestCase (assertEqual "new function type" (Just ty) (functionType gr2 "foo"))
,TestCase (assertEqual "old function prob" (-log 0) (functionProbability gr1 "foo"))
,TestCase (assertEqual "new function prob" pi (functionProbability gr2 "foo"))
,TestCase (assertEqual "old category prob" (-log 0) (categoryProbability gr1 "Q"))
,TestCase (assertEqual "new category prob" pi (categoryProbability gr2 "Q"))
]
performMajorGC