Function grid_map::getIndexFromLinearIndex

Function Documentation

Index grid_map::getIndexFromLinearIndex(const size_t linearIndex, const Size &bufferSize, const bool rowMajor = false)

Returns the regular index (2-dim.) corresponding to the linear index (1-dim.) for a given buffer size.

Parameters:
  • linearIndex[in] the he linear 1d index.

  • bufferSize[in] the map buffer size.

  • (optional)[in] rowMajor if the linear index is generated for row-major format.

Returns:

the regular 2d index.