|
31 | 31 | #include <chrono> |
32 | 32 | #include <random> |
33 | 33 |
|
34 | | -#include "superpose3d.hpp" |
| 34 | +#include "superpose3d.hpp" // Defines "Superpose3D" |
| 35 | +#include "matrix_alloc_jpd.hpp" // Defines "Alloc2D()" and "Dealloc2D()" |
| 36 | + |
35 | 37 | using namespace superpose3d; |
| 38 | +using namespace matrix_alloc_jpd; |
36 | 39 |
|
37 | 40 |
|
38 | 41 | int main(int argc, char **argv) { |
@@ -61,11 +64,11 @@ int main(int argc, char **argv) { |
61 | 64 | w[i] = 1.0 / n_points; |
62 | 65 |
|
63 | 66 | // Allocate the immobile point cloud array (X) and fill it with coordinates |
64 | | - matrix_alloc::Alloc2D(n_points, 3, &X); |
| 67 | + Alloc2D(n_points, 3, &X); |
65 | 68 | // Allocate the mobile point cloud array (x) and fill it with coordinates |
66 | | - matrix_alloc::Alloc2D(n_points, 3, &x); |
| 69 | + Alloc2D(n_points, 3, &x); |
67 | 70 | // Allocate space for the transformed mobile point cloud |
68 | | - matrix_alloc::Alloc2D(n_points, 3, &xprime); |
| 71 | + Alloc2D(n_points, 3, &xprime); |
69 | 72 |
|
70 | 73 | int seed = std::chrono::system_clock::now().time_since_epoch().count(); |
71 | 74 | std::default_random_engine rand_generator(seed); |
@@ -168,9 +171,9 @@ int main(int argc, char **argv) { |
168 | 171 |
|
169 | 172 | } // for (i_cl = 0; i_cl < n_point_clouds; i_cl++) |
170 | 173 |
|
171 | | - matrix_alloc::Dealloc2D(&xprime); |
172 | | - matrix_alloc::Dealloc2D(&X); |
173 | | - matrix_alloc::Dealloc2D(&x); |
| 174 | + Dealloc2D(&xprime); |
| 175 | + Dealloc2D(&X); |
| 176 | + Dealloc2D(&x); |
174 | 177 | delete [] w; |
175 | 178 |
|
176 | 179 | std::cout << "\n" << "test passed." << std::endl; |
|
0 commit comments