Diff of /src/lib/model/NodeArray.cc [01a998] .. [081fbe]  Maximize  Restore

Switch to side-by-side view

--- a/src/lib/model/NodeArray.cc
+++ b/src/lib/model/NodeArray.cc
@@ -170,6 +170,10 @@
 		string msg = "Attempt to set value of undefined node ";
 		throw runtime_error(msg + name() + 
 				    print(value.range().leftIndex(i)));
+	    }
+	    if (node->isObserved()) {
+		throw NodeError(node,
+				"Attempt to overwrite value of observed node");
 	    }
 	    if (node->isRandomVariable()) {
 		setnodes.insert(node);

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks