private void printPMC_FinalResult(Node node, PMCPotentialTable res) {
System.out.println("variable list "+res.getVariableList());
System.out.println("Continuous node list "+res.getContinuousNodeList());
EDBUnit SNode = EDB.This().get("ROOT.ENGINES.JT.NODES."+node.getName());
EDBUnit bel = SNode.get("BEL");
if (node.getType() == Node.PROBABILISTIC_NODE_TYPE) {
if (res.hasNoDescreteStates) {
System.out.println("Probability:");
System.out.println(res.getmChar().getProbability());
System.out.println("Mean:");
if(res.getmChar().getMeanMatrix() != null)
printMatrix(res.getmChar().getMeanMatrix().getMeanMatrix());
System.out.println("Covariance:");
if(res.getmChar().getCoVarMatrix() != null)
printMatrix(res.getmChar().getCoVarMatrix().getCoVarMatrix());
EDBUnit mu = bel.get("MU");
EDBUnit sigma = bel.get("SIGMA");
if( mu == null){
mu = bel.create("MU");
sigma = bel.create("SIGMA");
}
// mu.setData(mean.toString());
// sigma.setData(var.toString());
} else {
System.out.println("Probability:");
for (int i = 0; i < res.tableSize(); i++) {
System.out.println(res.getJPDValue(i));
}
System.out.println("Mean");
for (int i = 0; i < res.tableSize(); i++) {
if(res.getMeanMatValue(i) != null)
printMatrix(res.getMeanMatValue(i).getMeanMatrix());
}
System.out.println("Covariance");
for (int i = 0; i < res.tableSize(); i++) {
if(res.getCoVarMatValue(i) != null)
printMatrix(res.getCoVarMatValue(i).getCoVarMatrix());
}
}
}else{
if (res.hasNoDescreteStates) {
System.out.println("Probability:");
System.out.println(res.getmChar().getProbability());
System.out.println("Mean:");
if(res.getmChar().getMeanMatrix() != null)
printMatrix(res.getmChar().getMeanMatrix().getMeanMatrix());
System.out.println("Covariance:");
if(res.getmChar().getCoVarMatrix() != null)
printMatrix(res.getmChar().getCoVarMatrix().getCoVarMatrix());
EDBUnit mu = bel.get("MU");
EDBUnit sigma = bel.get("SIGMA");
if( mu == null){
mu = bel.create("MU");
sigma = bel.create("SIGMA");
}
// mu.setData(mean.toString());