diff --git a/packages/CLPBN/clpbn/bp/CbpSolver.cpp b/packages/CLPBN/clpbn/bp/CbpSolver.cpp index e385eaf11..6b38021ec 100644 --- a/packages/CLPBN/clpbn/bp/CbpSolver.cpp +++ b/packages/CLPBN/clpbn/bp/CbpSolver.cpp @@ -116,10 +116,7 @@ void CbpSolver::createLinks (void) { if (Globals::verbosity > 0) { - cout << "original factor graph has " ; - cout << fg.nrVarNodes() << " variables and " ; - cout << fg.nrFacNodes() << " factors " << endl; - cout << "compressed factor graph has " ; + cout << "compressed factor graph contains " ; cout << fg_->nrVarNodes() << " variables and " ; cout << fg_->nrFacNodes() << " factors " << endl; cout << endl; diff --git a/packages/CLPBN/clpbn/bp/HorusYap.cpp b/packages/CLPBN/clpbn/bp/HorusYap.cpp index 9c108ffd6..c74616a95 100644 --- a/packages/CLPBN/clpbn/bp/HorusYap.cpp +++ b/packages/CLPBN/clpbn/bp/HorusYap.cpp @@ -197,6 +197,7 @@ void readLiftedEvidence ( } unsigned evidence = (unsigned) YAP_IntOfTerm (YAP_ArgOfTerm (2, pair)); bool found = false; + cout << "has evidence()" << endl; for (unsigned i = 0; i < obsFormulas.size(); i++) { if (obsFormulas[i].functor() == functor && obsFormulas[i].arity() == args.size() && @@ -235,6 +236,7 @@ createGroundNetwork (void) factorList = YAP_TailOfTerm (factorList); } + unsigned nrObservedVars = 0; YAP_Term evidenceList = YAP_ARG3; while (evidenceList != YAP_TermNil()) { YAP_Term evTerm = YAP_HeadOfTerm (evidenceList); @@ -243,6 +245,13 @@ createGroundNetwork (void) assert (fg->getVarNode (vid)); fg->getVarNode (vid)->setEvidence (ev); evidenceList = YAP_TailOfTerm (evidenceList); + nrObservedVars ++; + } + if (Globals::verbosity > 0) { + cout << "factor graph contains " ; + cout << fg->nrVarNodes() << " variables " ; + cout << "(" << nrObservedVars << " observed) and " ; + cout << fg->nrFacNodes() << " factors " << endl; } YAP_Int p = (YAP_Int) (fg); return YAP_Unify (YAP_MkIntTerm (p), YAP_ARG4);