Fixed list_of problem on old boost and clang
parent
0212bbc30d
commit
14fef517d8
|
|
@ -184,8 +184,8 @@ TEST(GaussianBayesNet, ComputeSteepestDescentPoint) {
|
||||||
VectorValues actual = gbn.optimizeGradientSearch();
|
VectorValues actual = gbn.optimizeGradientSearch();
|
||||||
|
|
||||||
// Check that points agree
|
// Check that points agree
|
||||||
Vector actualAsVector = actual.vector(FastVector<Key>(list_of
|
FastVector<Key> keys = list_of(0)(1)(2)(3)(4);
|
||||||
(0)(1)(2)(3)(4)));
|
Vector actualAsVector = actual.vector(keys);
|
||||||
EXPECT(assert_equal(expected, actualAsVector, 1e-5));
|
EXPECT(assert_equal(expected, actualAsVector, 1e-5));
|
||||||
|
|
||||||
// Check that point causes a decrease in error
|
// Check that point causes a decrease in error
|
||||||
|
|
|
||||||
|
|
@ -274,9 +274,8 @@ TEST(GaussianBayesTree, ComputeSteepestDescentPointBT) {
|
||||||
VectorValues actual = bt.optimizeGradientSearch();
|
VectorValues actual = bt.optimizeGradientSearch();
|
||||||
|
|
||||||
// Check that points agree
|
// Check that points agree
|
||||||
Vector actualAsVector = actual.vector(FastVector<Key>(list_of
|
FastVector<Key> keys = list_of(0)(1)(2)(3)(4);
|
||||||
(0)(1)(2)(3)(4)));
|
EXPECT(assert_equal(expected, actual.vector(keys), 1e-5));
|
||||||
EXPECT(assert_equal(expected, actualAsVector, 1e-5));
|
|
||||||
EXPECT(assert_equal(expectedFromBN, actual, 1e-5));
|
EXPECT(assert_equal(expectedFromBN, actual, 1e-5));
|
||||||
|
|
||||||
// Check that point causes a decrease in error
|
// Check that point causes a decrease in error
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,8 @@ TEST(VectorValues, basics)
|
||||||
EXPECT(assert_equal(Vector_(2, 2.0, 3.0), actual[1]));
|
EXPECT(assert_equal(Vector_(2, 2.0, 3.0), actual[1]));
|
||||||
EXPECT(assert_equal(Vector_(2, 4.0, 5.0), actual[2]));
|
EXPECT(assert_equal(Vector_(2, 4.0, 5.0), actual[2]));
|
||||||
EXPECT(assert_equal(Vector_(2, 6.0, 7.0), actual[5]));
|
EXPECT(assert_equal(Vector_(2, 6.0, 7.0), actual[5]));
|
||||||
EXPECT(assert_equal(Vector_(7, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0), actual.vector(FastVector<Key>(list_of
|
FastVector<Key> keys = list_of(0)(1)(2)(5);
|
||||||
(0)(1)(2)(5)))));
|
EXPECT(assert_equal(Vector_(7, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0), actual.vector(keys)));
|
||||||
|
|
||||||
// Check exceptions
|
// Check exceptions
|
||||||
CHECK_EXCEPTION(actual.insert(1, Vector()), invalid_argument);
|
CHECK_EXCEPTION(actual.insert(1, Vector()), invalid_argument);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue