small improvement in HorusYap

This commit is contained in:
Tiago Gomes 2012-11-16 22:38:14 +00:00
parent 51eef45b2d
commit 85db763d9c

View File

@ -189,13 +189,12 @@ runGroundSolver (void)
taskList = YAP_TailOfTerm (taskList);
}
std::set<VarId> vids;
for (size_t i = 0; i < tasks.size(); i++) {
Util::addToSet (vids, tasks[i]);
}
FactorGraph* mfg = fg;
if (fg->bayesianFactors()) {
std::set<VarId> vids;
for (size_t i = 0; i < tasks.size(); i++) {
Util::addToSet (vids, tasks[i]);
}
mfg = BayesBall::getMinimalFactorGraph (
*fg, VarIds (vids.begin(), vids.end()));
}