MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / getLinearIndexFromIndex

Function getLinearIndexFromIndex

grid_map_core/src/GridMapMath.cpp:508–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508size_t getLinearIndexFromIndex(const Index& index, const Size& bufferSize, const bool rowMajor)
509{
510 if (!rowMajor) return index(1) * bufferSize(0) + index(0);
511 return index(0) * bufferSize(1) + index(1);
512}
513
514Index getIndexFromLinearIndex(const size_t linearIndex, const Size& bufferSize, const bool rowMajor)
515{

Callers 2

toOccupancyGridMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected