SocialCognitiveSystems / PRIMO

GNU Lesser General Public License v3.0
4 stars 3 forks source link

Changing values of nodes #15

Closed jpoeppel closed 6 years ago

jpoeppel commented 6 years ago

This PR adds the function "set_values" to the DiscreteNode class as well as "change_node_values" to the BayesianNetwork class. The former updates the values of a node, updating the dimensions of it's cpt and invalidating it in the process as one cannot assume that the old cpt is still valid. The latter does the same, but will also update the dimensions and invalidates all children of the changed node and should be preferred in general.