Fix issue with HybridOrdering
parent
2e233364b6
commit
691baa56de
|
@ -70,17 +70,10 @@ static void throwRuntimeError(const std::string &s,
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
const Ordering HybridOrdering(const HybridGaussianFactorGraph &graph) {
|
const Ordering HybridOrdering(const HybridGaussianFactorGraph &graph) {
|
||||||
KeySet discrete_keys = graph.discreteKeys();
|
KeySet discrete_keys = graph.discreteKeySet();
|
||||||
for (auto &factor : graph) {
|
|
||||||
for (const DiscreteKey &k : factor->discreteKeys()) {
|
|
||||||
discrete_keys.insert(k.first);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const VariableIndex index(graph);
|
const VariableIndex index(graph);
|
||||||
Ordering ordering = Ordering::ColamdConstrainedLast(
|
return Ordering::ColamdConstrainedLast(
|
||||||
index, KeyVector(discrete_keys.begin(), discrete_keys.end()), true);
|
index, KeyVector(discrete_keys.begin(), discrete_keys.end()), true);
|
||||||
return ordering;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************ */
|
/* ************************************************************************ */
|
||||||
|
|
Loading…
Reference in New Issue