small bug fixes

release/4.3a0
Chris Beall 2010-10-14 01:42:41 +00:00
parent 2945832086
commit 89a61305eb
2 changed files with 5 additions and 4 deletions

View File

@ -68,11 +68,12 @@ public:
/** Constructor from a frontal variable and an iterator range of parents */
template<typename Iterator>
static Conditional::shared_ptr FromRange(Index key, Iterator firstParent, Iterator lastParent) : nrFrontals_(1) {
static Conditional::shared_ptr FromRange(Index key, Iterator firstParent, Iterator lastParent) {
Conditional::shared_ptr conditional(new Conditional);
conditional->nrFrontals_ = 1;
conditional->keys_.push_back(key);
std::copy(firstKey, lastKey, back_inserter(conditional->keys_));
return ret;
std::copy(firstParent, lastParent, back_inserter(conditional->keys_));
return conditional;
}
/** Named constructor from any number of frontal variables and parents */

View File

@ -72,7 +72,7 @@ Inference::EliminateOneSymbolic(FactorGraph<Factor>& factorGraph, VariableIndex<
// Join the factors and eliminate the variable from the joint factor
tic("EliminateOne: Combine");
Conditional::shared_ptr conditional = Conditional::fromRange(involvedKeys.begin(), involvedKeys.end(), 1);
Conditional::shared_ptr conditional = Conditional::FromRange(involvedKeys.begin(), involvedKeys.end(), 1);
Factor::shared_ptr eliminated(new Factor(conditional->beginParents(), conditional->endParents()));
toc("EliminateOne: Combine");