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

Function getIndexFromLinearIndex

grid_map_core/src/GridMapMath.cpp:514–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512}
513
514Index getIndexFromLinearIndex(const size_t linearIndex, const Size& bufferSize, const bool rowMajor)
515{
516 if (!rowMajor) return Index((int)linearIndex % bufferSize(0), (int)linearIndex / bufferSize(0));
517 return Index((int)linearIndex / bufferSize(1), (int)linearIndex % bufferSize(1));
518}
519
520void getIndicesForRegion(const Index& regionIndex, const Size& regionSize,
521 std::vector<Index> indices)

Callers 3

processGridMapCellMethod · 0.85
TESTFunction · 0.85
operator *Method · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68