reduce call stack
parent
7d468e98a0
commit
bfb21c2faa
|
@ -36,17 +36,17 @@ namespace gtsam {
|
||||||
// no Ordering is provided. When removing optional from VariableIndex, create VariableIndex
|
// no Ordering is provided. When removing optional from VariableIndex, create VariableIndex
|
||||||
// before creating ordering.
|
// before creating ordering.
|
||||||
VariableIndex computedVariableIndex(asDerived());
|
VariableIndex computedVariableIndex(asDerived());
|
||||||
return eliminateSequential(function, computedVariableIndex, orderingType);
|
return eliminateSequential(orderingType, function, computedVariableIndex);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Compute an ordering and call this function again. We are guaranteed to have a
|
// Compute an ordering and call this function again. We are guaranteed to have a
|
||||||
// VariableIndex already here because we computed one if needed in the previous 'if' block.
|
// VariableIndex already here because we computed one if needed in the previous 'if' block.
|
||||||
if (orderingType == Ordering::METIS) {
|
if (orderingType == Ordering::METIS) {
|
||||||
Ordering computedOrdering = Ordering::Metis(asDerived());
|
Ordering computedOrdering = Ordering::Metis(asDerived());
|
||||||
return eliminateSequential(computedOrdering, function, variableIndex, orderingType);
|
return eliminateSequential(computedOrdering, function, variableIndex);
|
||||||
} else {
|
} else {
|
||||||
Ordering computedOrdering = Ordering::Colamd(*variableIndex);
|
Ordering computedOrdering = Ordering::Colamd(*variableIndex);
|
||||||
return eliminateSequential(computedOrdering, function, variableIndex, orderingType);
|
return eliminateSequential(computedOrdering, function, variableIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue