Whitespace
parent
4f4898beb1
commit
49a2602428
|
|
@ -117,15 +117,15 @@ namespace gtsam {
|
||||||
|
|
||||||
FastSet<Index> keys;
|
FastSet<Index> keys;
|
||||||
BOOST_FOREACH(const IndexFactor::shared_ptr& factor, factors)
|
BOOST_FOREACH(const IndexFactor::shared_ptr& factor, factors)
|
||||||
BOOST_FOREACH(Index var, *factor)
|
BOOST_FOREACH(Index var, *factor)
|
||||||
keys.insert(var);
|
keys.insert(var);
|
||||||
|
|
||||||
if (keys.size() < nrFrontals) throw invalid_argument(
|
if (keys.size() < nrFrontals) throw invalid_argument(
|
||||||
"EliminateSymbolic requested to eliminate more variables than exist in graph.");
|
"EliminateSymbolic requested to eliminate more variables than exist in graph.");
|
||||||
|
|
||||||
vector<Index> newKeys(keys.begin(), keys.end());
|
vector<Index> newKeys(keys.begin(), keys.end());
|
||||||
return make_pair(boost::make_shared<IndexConditional>(newKeys, nrFrontals),
|
return make_pair(boost::make_shared<IndexConditional>(newKeys, nrFrontals),
|
||||||
boost::make_shared<IndexFactor>(newKeys.begin() + nrFrontals, newKeys.end()));
|
boost::make_shared<IndexFactor>(newKeys.begin() + nrFrontals, newKeys.end()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue