Fixed a bug in checking for empty-matrix Jacobians that still have keys (kind of a hack)
parent
f262801932
commit
411e934385
|
@ -73,7 +73,7 @@ Scatter::Scatter(const GaussianFactorGraph& gfg, boost::optional<const Ordering&
|
|||
for(GaussianFactor::const_iterator variable = factor->begin(); variable != factor->end(); ++variable) {
|
||||
// TODO: Fix this hack to cope with zero-row Jacobians that come from BayesTreeOrphanWrappers
|
||||
const JacobianFactor* asJacobian = dynamic_cast<const JacobianFactor*>(factor.get());
|
||||
if(!asJacobian || asJacobian->rows() > 0)
|
||||
if(!asJacobian || asJacobian->cols() > 1)
|
||||
this->insert(make_pair(*variable, SlotEntry(none, factor->getDim(variable))));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace gtsam {
|
|||
const size_t sourceVarpos = slots->second[sourceFactorI];
|
||||
if(sourceVarpos < numeric_limits<size_t>::max()) {
|
||||
const JacobianFactor& sourceFactor = *factors[sourceFactorI];
|
||||
if(sourceFactor.cols() > 0) {
|
||||
if(sourceFactor.cols() > 1) {
|
||||
foundVariable = true;
|
||||
DenseIndex vardim = sourceFactor.getDim(sourceFactor.begin() + sourceVarpos);
|
||||
|
||||
|
|
Loading…
Reference in New Issue