From 66f8ba7f06b9369276e6210f756b075591efa6fa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 23 Apr 2019 20:55:47 +0200 Subject: Support using any array-like type for points --- test/test_hilbert.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/test_hilbert.cpp') diff --git a/test/test_hilbert.cpp b/test/test_hilbert.cpp index 1d32668..5d1f52a 100644 --- a/test/test_hilbert.cpp +++ b/test/test_hilbert.cpp @@ -92,12 +92,12 @@ test_standard(Context& ctx) H ha = make_zero_bitvec(); assert(ha.size() >= D * M); - chilbert::coords_to_index(pa.data(), M, D, ha); + chilbert::coords_to_index(pa, M, D, ha); { // Ensure unmapping results in the original point auto pa_out = make_random_point(ctx); - chilbert::index_to_coords(pa_out.data(), M, D, ha); + chilbert::index_to_coords(pa_out, M, D, ha); assert(pa_out == pa); } @@ -110,7 +110,7 @@ test_standard(Context& ctx) // Unmap next hilbert index to a point auto pb = make_random_point(ctx); - chilbert::index_to_coords(pb.data(), M, D, hb); + chilbert::index_to_coords(pb, M, D, hb); // Ensure next point is 1 unit of distance away from first assert(squared_distance(pa, pb) == 1); @@ -128,12 +128,12 @@ test_compact(Context& ctx) T ha = make_zero_bitvec(); assert(ha.size() >= D * M); - chilbert::coords_to_compact_index(pa.data(), ms.data(), D, ha); + chilbert::coords_to_compact_index(pa, ms.data(), D, ha); { // Ensure unmapping results in the original point auto pa_out = make_random_point(ctx); - chilbert::compact_index_to_coords(pa_out.data(), ms.data(), D, ha); + chilbert::compact_index_to_coords(pa_out, ms.data(), D, ha); assert(pa_out == pa); } @@ -146,7 +146,7 @@ test_compact(Context& ctx) // Unmap next hilbert index to a point auto pb = make_random_point(ctx); - chilbert::compact_index_to_coords(pb.data(), ms.data(), D, hb); + chilbert::compact_index_to_coords(pb, ms.data(), D, hb); // Ensure next point is 1 unit of distance away from first assert(squared_distance(pa, pb) == 1); -- cgit v1.2.1