fix test TODOs
parent
acda56d67b
commit
878c626a96
|
|
@ -128,7 +128,10 @@ TEST(HybridGaussianProductFactor, AsProductFactor) {
|
||||||
EXPECT(actual.first.at(0) == f10);
|
EXPECT(actual.first.at(0) == f10);
|
||||||
EXPECT_DOUBLES_EQUAL(10, actual.second, 1e-9);
|
EXPECT_DOUBLES_EQUAL(10, actual.second, 1e-9);
|
||||||
|
|
||||||
// TODO(Frank): when killed hiding, f11 should also be there
|
mode[m1.first] = 1;
|
||||||
|
actual = product(mode);
|
||||||
|
EXPECT(actual.first.at(0) == f11);
|
||||||
|
EXPECT_DOUBLES_EQUAL(11, actual.second, 1e-9);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
@ -145,7 +148,10 @@ TEST(HybridGaussianProductFactor, AddOne) {
|
||||||
EXPECT(actual.first.at(0) == f10);
|
EXPECT(actual.first.at(0) == f10);
|
||||||
EXPECT_DOUBLES_EQUAL(10, actual.second, 1e-9);
|
EXPECT_DOUBLES_EQUAL(10, actual.second, 1e-9);
|
||||||
|
|
||||||
// TODO(Frank): when killed hiding, f11 should also be there
|
mode[m1.first] = 1;
|
||||||
|
actual = product(mode);
|
||||||
|
EXPECT(actual.first.at(0) == f11);
|
||||||
|
EXPECT_DOUBLES_EQUAL(11, actual.second, 1e-9);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
@ -166,9 +172,8 @@ TEST(HybridGaussianProductFactor, AddTwo) {
|
||||||
EXPECT_DOUBLES_EQUAL(10 + 20, actual00.second, 1e-9);
|
EXPECT_DOUBLES_EQUAL(10 + 20, actual00.second, 1e-9);
|
||||||
|
|
||||||
auto actual12 = product({{M(1), 1}, {M(2), 2}});
|
auto actual12 = product({{M(1), 1}, {M(2), 2}});
|
||||||
// TODO(Frank): when killed hiding, these should also equal:
|
EXPECT(actual12.first.at(0) == f11);
|
||||||
// EXPECT(actual12.first.at(0) == f11);
|
EXPECT(actual12.first.at(1) == f22);
|
||||||
// EXPECT(actual12.first.at(1) == f22);
|
|
||||||
EXPECT_DOUBLES_EQUAL(11 + 22, actual12.second, 1e-9);
|
EXPECT_DOUBLES_EQUAL(11 + 22, actual12.second, 1e-9);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -973,8 +973,6 @@ TEST(HybridNonlinearFactorGraph, DifferentMeans) {
|
||||||
VectorValues cont0 = bn->optimize(dv0);
|
VectorValues cont0 = bn->optimize(dv0);
|
||||||
double error0 = bn->error(HybridValues(cont0, dv0));
|
double error0 = bn->error(HybridValues(cont0, dv0));
|
||||||
|
|
||||||
// TODO(Varun) Perform importance sampling to estimate error?
|
|
||||||
|
|
||||||
// regression
|
// regression
|
||||||
EXPECT_DOUBLES_EQUAL(0.69314718056, error0, 1e-9);
|
EXPECT_DOUBLES_EQUAL(0.69314718056, error0, 1e-9);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue