update tests

release/4.3a0
Varun Agrawal 2024-09-14 14:57:55 -04:00
parent 0ee9aac434
commit d5160f7006
3 changed files with 4 additions and 5 deletions

View File

@ -544,8 +544,7 @@ std::shared_ptr<HybridGaussianFactor> mixedVarianceFactor(
auto func =
[&](const Assignment<Key>& assignment,
const GaussianFactorValuePair& gfv) -> GaussianFactorValuePair {
auto [gf, val] = gfv;
const GaussianFactor::shared_ptr& gf) -> GaussianFactorValuePair {
if (assignment.at(mode) != tight_index) {
double factor_log_constant = -0.5 * d * log2pi + log(1.0 / noise_loose);

View File

@ -183,7 +183,7 @@ TEST(HybridGaussianConditional, Likelihood2) {
// Check the detailed JacobianFactor calculation for mode==1.
{
// We have a JacobianFactor
const auto gf1 = (*likelihood)(assignment1).first;
const auto gf1 = (*likelihood)(assignment1);
const auto jf1 = std::dynamic_pointer_cast<JacobianFactor>(gf1);
CHECK(jf1);

View File

@ -734,8 +734,8 @@ TEST(HybridGaussianFactorGraph, assembleGraphTree) {
// Expected decision tree with two factor graphs:
// f(x0;mode=0)P(x0) and f(x0;mode=1)P(x0)
GaussianFactorGraphTree expected{
M(0), GaussianFactorGraph(std::vector<GF>{(*mixture)(d0).first, prior}),
GaussianFactorGraph(std::vector<GF>{(*mixture)(d1).first, prior})};
M(0), GaussianFactorGraph(std::vector<GF>{(*mixture)(d0), prior}),
GaussianFactorGraph(std::vector<GF>{(*mixture)(d1), prior})};
EXPECT(assert_equal(expected(d0), actual(d0), 1e-5));
EXPECT(assert_equal(expected(d1), actual(d1), 1e-5));