address some PR comments

release/4.3a0
Varun Agrawal 2024-09-15 09:16:31 -04:00
parent e2f1ad78a0
commit 3eb91a4ba0
2 changed files with 5 additions and 5 deletions

View File

@ -110,7 +110,7 @@ class HybridNonlinearFactor : public HybridFactor {
std::inserter(factor_keys_set, factor_keys_set.end()));
if (auto nf = std::dynamic_pointer_cast<NonlinearFactor>(f)) {
nonlinear_factors.push_back(std::make_pair(nf, val));
nonlinear_factors.emplace_back(nf, val);
} else {
throw std::runtime_error(
"Factors passed into HybridNonlinearFactor need to be nonlinear!");

View File

@ -616,15 +616,15 @@ TEST(HybridGaussianFactor, TwoStateModel2) {
/* ************************************************************************* */
/**
* Test a model P(z0|x0)P(x1|x0,m1)P(z1|x1)P(m1).
* Test a model p(z0|x0)p(x1|x0,m1)p(z1|x1)p(m1).
*
* P(x1|x0,m1) has the same means but different covariances.
* p(x1|x0,m1) has the same means but different covariances.
*
* Converting to a factor graph gives us
* ϕ(x0)ϕ(x1,x0,m1)ϕ(x1)P(m1)
* ϕ(x0)ϕ(x1,x0,m1)ϕ(x1)p(m1)
*
* If we only have a measurement on z0, then
* the P(m1) should be 0.5/0.5.
* the p(m1) should be 0.5/0.5.
* Getting a measurement on z1 gives use more information.
*/
TEST(HybridGaussianFactor, TwoStateModel3) {