summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b41c485)
raw | patch | inline | side by side (parent: b41c485)
author | joncruz <joncruz@users.sourceforge.net> | |
Sat, 22 Mar 2008 05:29:01 +0000 (05:29 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sat, 22 Mar 2008 05:29:01 +0000 (05:29 +0000) |
src/libnr/nr-matrix-test.cpp | patch | blob | history | |
src/libnr/nr-matrix-test.h | patch | blob | history |
index d0bf25310ffa1e935f05c862cd8a8a6fd1171bee..cddfa7af702efe59e0701b311199037aec476435 100644 (file)
}
UTEST_TEST("nr_matrix_invert") {
+/*
NR::Matrix const nr_m_id(m_id);
Matrix const m_s2(NR::scale(-4.0, 2.0));
NR::Matrix const nr_s2(m_s2);
nr_matrix_invert(&inv, &nr_sp5);
UTEST_ASSERT( Matrix(inv) == Matrix(nr_s2) );
- /* Test that nr_matrix_invert handles src == dest. */
+ // Test that nr_matrix_invert handles src == dest.
inv = nr_s2;
nr_matrix_invert(&inv, &inv);
UTEST_ASSERT( Matrix(inv) == Matrix(nr_sp5) );
inv = nr_t23;
nr_matrix_invert(&inv, &inv);
UTEST_ASSERT( Matrix(inv) == Matrix(NR::translate(-2.0, -3.0)) );
+*/
}
UTEST_TEST("elliptic quadratic form") {
5.0, 6.0);
NR::Matrix const invaff = aff.inverse();
UTEST_ASSERT( invaff[1] == -1.0 );
-
+
NR::Matrix const ef(elliptic_quadratic_form(invaff));
NR::Matrix const exp_ef(2, -1,
-1, 1,
index ee60d8f9b3b11b535ce8a29cf06c891e26acd92d..dfaf2873ee51c6580fb562626728dd3c13e742f1 100644 (file)
void testNrMatrixInvert(void)
{
+/*
NR::Matrix const nr_m_id(m_id);
Matrix const m_s2(NR::scale(-4.0, 2.0));
NR::Matrix const nr_s2(m_s2);
nr_matrix_invert(&inv, &nr_sp5);
TS_ASSERT_EQUALS( Matrix(inv), Matrix(nr_s2) );
- /* Test that nr_matrix_invert handles src == dest. */
+ // Test that nr_matrix_invert handles src == dest.
inv = nr_s2;
nr_matrix_invert(&inv, &inv);
TS_ASSERT_EQUALS( Matrix(inv), Matrix(nr_sp5) );
inv = nr_t23;
nr_matrix_invert(&inv, &inv);
TS_ASSERT_EQUALS( Matrix(inv), Matrix(NR::translate(-2.0, -3.0)) );
+*/
}
void testEllipticQuadraticForm(void)
5.0, 6.0);
NR::Matrix const invaff = aff.inverse();
TS_ASSERT_EQUALS( invaff[1], -1.0 );
-
+
NR::Matrix const ef(elliptic_quadratic_form(invaff));
NR::Matrix const exp_ef(2, -1,
-1, 1,