+ "<smile version=\"1.0\" id=\"" + graph.getName()
+ "\" numsamples=\"1000\"");
w.write(">" + ln + " <nodes>" + ln);
// Dump out the variables
for (TopologicalOrderIterator it = new TopologicalOrderIterator(graph); it.hasNext();) {
BNNode node = (BNNode) it.next();
if (node.isDecision()) {
writeDecision(node, w, ln);
} else if (node.isUtility()) {
writeUtility(node, w, ln);
} else if (node.isDeterministic()) {
writeDeterministic(node, w, ln);
} else if (node.isNoisyMax()) {
writeNoisyMax(node, w, ln);
} else {
writeCPT(node, w, ln);
}
}
// Dump out the variables
w.write(" </nodes>" + ln);
w.write(" <extensions>" + ln);
w.write(
" <genie version=\"1.0\" app=\"GeNIe 2.0.2937.0\" name= \""
+ graph.getName() + "\" faultnameformat=\"nodestate\">"
+ ln);
for (TopologicalOrderIterator it = new TopologicalOrderIterator(graph); it.hasNext();) {
BNNode node = (BNNode) it.next();
writeGenieNode(node, w, ln);
}