correct behavior when entire columns are zero

release/4.3a0
Frank Dellaert 2009-12-31 10:30:44 +00:00
parent 46a65d89df
commit eaa8176de1
1 changed files with 2 additions and 1 deletions

View File

@ -107,7 +107,8 @@ VectorConfig backSubstituteTranspose(const GaussianBayesNet& bn,
VectorConfig gy;
BOOST_FOREACH(GaussianConditional::shared_ptr cg, bn) {
const string& j = cg->key();
gy.insert(j,gx[j]); // initialize result
Vector gyj = gx.contains(j) ? gx[j] : zero(cg->dim());
gy.insert(j,gyj); // initialize result
}
// we loop from first-eliminated to last-eliminated