Metis ordering difference between linux/mac
parent
a753f763c0
commit
8d89529c98
|
@ -239,7 +239,7 @@ TEST(Ordering, MetisLoop) {
|
||||||
sfg.push_factor(0, 5);
|
sfg.push_factor(0, 5);
|
||||||
|
|
||||||
// METIS
|
// METIS
|
||||||
#ifdef LINUX
|
#if !defined(__APPLE__)
|
||||||
{
|
{
|
||||||
Ordering actual = Ordering::Create(Ordering::METIS, sfg);
|
Ordering actual = Ordering::Create(Ordering::METIS, sfg);
|
||||||
// - P( 0 4 1)
|
// - P( 0 4 1)
|
||||||
|
|
|
@ -729,20 +729,33 @@ TEST(SymbolicBayesTree, COLAMDvsMETIS) {
|
||||||
// METIS
|
// METIS
|
||||||
{
|
{
|
||||||
Ordering ordering = Ordering::Create(Ordering::METIS, sfg);
|
Ordering ordering = Ordering::Create(Ordering::METIS, sfg);
|
||||||
|
// Linux and Mac split differently when using mettis
|
||||||
|
#if !defined(__APPLE__)
|
||||||
|
EXPECT(assert_equal(Ordering(list_of(3)(2)(5)(0)(4)(1)), ordering));
|
||||||
|
#else
|
||||||
EXPECT(assert_equal(Ordering(list_of(5)(4)(2)(1)(0)(3)), ordering));
|
EXPECT(assert_equal(Ordering(list_of(5)(4)(2)(1)(0)(3)), ordering));
|
||||||
|
#endif
|
||||||
|
|
||||||
// - P( 1 0 3)
|
// - P( 1 0 3)
|
||||||
// | - P( 4 | 0 3)
|
// | - P( 4 | 0 3)
|
||||||
// | | - P( 5 | 0 4)
|
// | | - P( 5 | 0 4)
|
||||||
// | - P( 2 | 1 3)
|
// | - P( 2 | 1 3)
|
||||||
SymbolicBayesTree expected;
|
SymbolicBayesTree expected;
|
||||||
|
#if !defined(__APPLE__)
|
||||||
expected.insertRoot(
|
expected.insertRoot(
|
||||||
MakeClique(list_of(1)(0)(3), 3,
|
MakeClique(list_of(2)(4)(1), 3,
|
||||||
list_of(
|
list_of(
|
||||||
MakeClique(list_of(4)(0)(3), 1,
|
MakeClique(list_of(0)(1)(4), 1,
|
||||||
list_of(MakeClique(list_of(5)(0)(4), 1))))(
|
list_of(MakeClique(list_of(5)(0)(4), 1))))(
|
||||||
MakeClique(list_of(2)(1)(3), 1))));
|
MakeClique(list_of(3)(2)(4), 1))));
|
||||||
|
#else
|
||||||
|
expected.insertRoot(
|
||||||
|
MakeClique(list_of(1)(0)(3), 3,
|
||||||
|
list_of(
|
||||||
|
MakeClique(list_of(4)(0)(3), 1,
|
||||||
|
list_of(MakeClique(list_of(5)(0)(4), 1))))(
|
||||||
|
MakeClique(list_of(2)(1)(3), 1))));
|
||||||
|
#endif
|
||||||
SymbolicBayesTree actual = *sfg.eliminateMultifrontal(ordering);
|
SymbolicBayesTree actual = *sfg.eliminateMultifrontal(ordering);
|
||||||
EXPECT(assert_equal(expected, actual));
|
EXPECT(assert_equal(expected, actual));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue