MCPcopy Create free account
hub / github.com/davisking/dlib / matrix_test1

Function matrix_test1

dlib/test/matrix2.cpp:30–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 dlib::rand rnd;
29
30 void matrix_test1 (
31 )
32 {
33 typedef memory_manager_stateless<char>::kernel_2_2a MM;
34 print_spinner();
35
36 const double ident[] = {
37 1, 0, 0, 0,
38 0, 1, 0, 0,
39 0, 0, 1, 0,
40 0, 0, 0, 1 };
41
42 const double uniform3[] = {
43 3, 3, 3, 3,
44 3, 3, 3, 3,
45 3, 3, 3, 3,
46 3, 3, 3, 3
47 };
48
49 const double uniform1[] = {
50 1, 1, 1, 1,
51 1, 1, 1, 1,
52 1, 1, 1, 1,
53 1, 1, 1, 1
54 };
55
56 const double uniform0[] = {
57 0, 0, 0, 0,
58 0, 0, 0, 0,
59 0, 0, 0, 0,
60 0, 0, 0, 0
61 };
62
63 const int array[] = {
64 42, 58, 9, 1,
65 9, 5, 8, 2,
66 98, 28, 4, 77,
67 9, 2, 44, 88 };
68
69 const int array2[] = {
70 1, 22, 3,
71 4, 52, 6,
72 7, 8, 9 };
73
74 const int array2_r[] = {
75 52, 6, 4,
76 8, 9, 7,
77 22, 3, 1
78 };
79
80 const double array_f[] = {
81 -0.99,
82 0.99};
83
84
85 matrix<double,2,1,MM> fm(array_f);
86
87 DLIB_TEST(fm.size() == 2);

Callers 1

perform_testMethod · 0.85

Calls 15

print_spinnerFunction · 0.85
roundFunction · 0.85
absFunction · 0.85
squaredFunction · 0.85
set_all_elementsFunction · 0.85
removercFunction · 0.85
pointwise_multiplyFunction · 0.85
cubedFunction · 0.85
pointwise_divideFunction · 0.85
tmpFunction · 0.85
detFunction · 0.85
min_pointFunction · 0.85

Tested by

no test coverage detected