Expanded shortcut_overlapping_separator test in testGaussianBayesTreeB to allow for sign reversal in a row of the augmented Jacobian. The joint density does not appear to be affected in the case where the augmented Jacobian row sign is changed, so we should not fail the test if that happens.
parent
1a1cfdd0ad
commit
bd4ab1598e
|
@ -317,8 +317,25 @@ TEST(GaussianBayesTree, shortcut_overlapping_separator)
|
||||||
5, 0, 6,
|
5, 0, 6,
|
||||||
0, -11, -12
|
0, -11, -12
|
||||||
).finished();
|
).finished();
|
||||||
|
|
||||||
Matrix actualJointJ = joint.augmentedJacobian();
|
Matrix actualJointJ = joint.augmentedJacobian();
|
||||||
|
|
||||||
|
bool Row0RhsSignsEqual =
|
||||||
|
signbit(expectedJointJ(0, 2)) == signbit(actualJointJ(0, 2));
|
||||||
|
|
||||||
|
if (!Row0RhsSignsEqual)
|
||||||
|
{
|
||||||
|
expectedJointJ.row(0) = -expectedJointJ.row(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Row1RhsSignsEqual =
|
||||||
|
signbit(expectedJointJ(1, 2)) == signbit(actualJointJ(1, 2));
|
||||||
|
|
||||||
|
if (!Row1RhsSignsEqual)
|
||||||
|
{
|
||||||
|
expectedJointJ.row(1) = -expectedJointJ.row(1);
|
||||||
|
}
|
||||||
|
|
||||||
EXPECT(assert_equal(expectedJointJ, actualJointJ));
|
EXPECT(assert_equal(expectedJointJ, actualJointJ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue