Skip to content
Snippets Groups Projects
Commit 68fe6f4a authored by Fabian Reister's avatar Fabian Reister
Browse files

minor

parent e225233e
No related branches found
No related tags found
1 merge request!129Debugging segmentation fault in spfa algorithm
......@@ -36,24 +36,28 @@
namespace armarx::navigation::algorithms::spfa
{
constexpr std::size_t
ravel(std::size_t row, std::size_t col, std::size_t num_cols)
namespace
{
return (row * num_cols) + col;
}
constexpr std::size_t
ravel(std::size_t row, std::size_t col, std::size_t num_cols)
{
return (row * num_cols) + col;
}
Eigen::Vector2i
unravel(const std::size_t pos, const std::size_t numCols)
{
ARMARX_CHECK_GREATER_EQUAL(pos, 0);
ARMARX_CHECK_GREATER(numCols, 0);
Eigen::Vector2i
unravel(const std::size_t pos, const std::size_t numCols)
{
ARMARX_CHECK_GREATER_EQUAL(pos, 0);
ARMARX_CHECK_GREATER(numCols, 0);
Eigen::Vector2i p;
p.x() = static_cast<int>(pos) / numCols;
p.y() = static_cast<int>(pos) % numCols;
Eigen::Vector2i p;
p.x() = static_cast<int>(pos) / numCols;
p.y() = static_cast<int>(pos) % numCols;
return p;
}
return p;
}
} // namespace
ShortestPathFasterAlgorithm::ShortestPathFasterAlgorithm(const Costmap& grid,
const Parameters& params) :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment