fast-marching-method
fast-marching-method copied to clipboard
Test case failure in Checkerboard with dimension >=3
There appears to be a logic error in the algorithm or in the supporting code for the test cases, which may or may not be related to commit 7a263040bd46a2e58149c1a659839e61c3c01fce. Reverting the "N" value back to 2 produces this compilation error:
fast-marching-method/test/util.hpp:600:13: error: no matching function for call to ‘std::vector<std::array<int, 2> >::push_back(std::array<int, 3>&)’
[build] 600 | new_foreground_indices.push_back(neighbor_index);
In the file signed_arrival_time_test.cpp at line 745 there is an assertion that "time" is less than 0 if the point is not an edge. However, Checkerboard positions (2,1,1) and (2,1,1,1) respectively when called with float,3, float,4, double,3, or double,4, the value of "time" is 1 causing the assertion to fail.
The exact failures are:
[----------] 15 tests from SignedArrivalTimeTest/1, where TypeParam = util::ScalarDimensionPair<float, 3ul>
fast-marching-method/test/signed_arrival_time_test.cpp:745: Failure
Expected: (time) < (ScalarType{0}), actual: 1 vs 0
[----------] 15 tests from SignedArrivalTimeTest/2, where TypeParam = util::ScalarDimensionPair<float, 4ul>
fast-marching-method/test/signed_arrival_time_test.cpp:745: Failure
Expected: (time) < (ScalarType{0}), actual: 1 vs 0
[----------] 15 tests from SignedArrivalTimeTest/4, where TypeParam = util::ScalarDimensionPair<double, 3ul>
fast-marching-method/test/signed_arrival_time_test.cpp:745: Failure
Expected: (time) < (ScalarType{0}), actual: 1 vs 0
[----------] 15 tests from SignedArrivalTimeTest/5, where TypeParam = util::ScalarDimensionPair<double, 4ul>
fast-marching-method/test/signed_arrival_time_test.cpp:745: Failure
Expected: (time) < (ScalarType{0}), actual: 1 vs 0
[ PASSED ] 86 tests.
[ FAILED ] 4 tests, listed below:
[ FAILED ] SignedArrivalTimeTest/1.Checkerboard, where TypeParam = util::ScalarDimensionPair<float, 3ul>
[ FAILED ] SignedArrivalTimeTest/2.Checkerboard, where TypeParam = util::ScalarDimensionPair<float, 4ul>
[ FAILED ] SignedArrivalTimeTest/4.Checkerboard, where TypeParam = util::ScalarDimensionPair<double, 3ul>
[ FAILED ] SignedArrivalTimeTest/5.Checkerboard, where TypeParam = util::ScalarDimensionPair<double, 4ul>
The compiler being used is GNU g++ 9.3.0 running on Ubuntu Linux 20.04 LTS.