Commit 835d3b9b authored by Davis King's avatar Davis King

fixed incorrect tests

parent cd834b49
......@@ -1085,28 +1085,28 @@ namespace
matrix<double> p = g + tau*dlib::colm(B,0);
matrix<double> q = dlib::colm(B,0);
DLIB_TEST(length(p-q) < 1e-14);
DLIB_TEST(max(abs(p-q)) < 1e-14);
p = tau*dlib::colm(B,0);
q = dlib::colm(B,0);
DLIB_TEST(length(p-q) < 1e-14);
DLIB_TEST(max(abs(p-q)) < 1e-14);
g = dlib::uniform_matrix<double>(n,n,0.0);
p = g + tau*B;
DLIB_TEST(length(p-B) < 1e-14);
DLIB_TEST(max(abs(p-B)) < 1e-14);
p = g + tau*subm(B,get_rect(B));
DLIB_TEST(length(p-B) < 1e-14);
DLIB_TEST(max(abs(p-B)) < 1e-14);
g = dlib::uniform_matrix<double>(2,2,0.0);
p = g + tau*subm(B,1,1,2,2);
DLIB_TEST(length(p-subm(B,1,1,2,2)) < 1e-14);
DLIB_TEST(max(abs(p-subm(B,1,1,2,2))) < 1e-14);
set_subm(p,0,0,2,2) = g + tau*subm(B,1,1,2,2);
DLIB_TEST(length(p-subm(B,1,1,2,2)) < 1e-14);
DLIB_TEST(max(abs(p-subm(B,1,1,2,2))) < 1e-14);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment