Accessing matrices works

release/4.3a0
dellaert 2014-10-11 11:04:39 +02:00
parent 69b69a0bc8
commit 1f692638f5
1 changed files with 6 additions and 6 deletions

View File

@ -143,7 +143,7 @@ TEST(ExpressionFactor, binary) {
EXPECT_LONGS_EQUAL(16, sizeof(ExecutionTrace<Cal3_S2>)); EXPECT_LONGS_EQUAL(16, sizeof(ExecutionTrace<Cal3_S2>));
EXPECT_LONGS_EQUAL(2*5*8, sizeof(Binary::JacobianTA1)); EXPECT_LONGS_EQUAL(2*5*8, sizeof(Binary::JacobianTA1));
EXPECT_LONGS_EQUAL(2*2*8, sizeof(Binary::JacobianTA2)); EXPECT_LONGS_EQUAL(2*2*8, sizeof(Binary::JacobianTA2));
size_t expectedRecordSize = 16 + 2*16 + 80 + 32; size_t expectedRecordSize = 16 + 2 * 16 + 80 + 32;
EXPECT_LONGS_EQUAL(expectedRecordSize, sizeof(Binary::Record)); EXPECT_LONGS_EQUAL(expectedRecordSize, sizeof(Binary::Record));
size_t size = sizeof(Binary::Record); size_t size = sizeof(Binary::Record);
// Use Variable Length Array, allocated on stack by gcc // Use Variable Length Array, allocated on stack by gcc
@ -151,13 +151,13 @@ TEST(ExpressionFactor, binary) {
char raw[size]; char raw[size];
ExecutionTrace<Point2> trace; ExecutionTrace<Point2> trace;
Point2 value = tester.binary_.traceExecution(values, trace, raw); Point2 value = tester.binary_.traceExecution(values, trace, raw);
trace.print(); // trace.print();
// Check matrices // Check matrices
// boost::optional<Binary::Record*> p = trace.record<Binary::Record>(); boost::optional<Binary::Record*> p = trace.record<Binary::Record>();
// CHECK(p); CHECK(p);
// EXPECT( assert_equal(expected25, (Matrix)(*p)->dTdA1, 1e-9)); EXPECT( assert_equal(expected25, (Matrix)(*p)->dTdA1, 1e-9));
// EXPECT( assert_equal(expected22, (Matrix)(*p)->dTdA2, 1e-9)); EXPECT( assert_equal(expected22, (Matrix)(*p)->dTdA2, 1e-9));
} }
///* ************************************************************************* */ ///* ************************************************************************* */
//// Unary(Binary(Leaf,Leaf)) //// Unary(Binary(Leaf,Leaf))