Function Jet::Utilities::RavelIndex

Function Documentation

inline unsigned long long Jet::Utilities::RavelIndex(const std::vector<size_t> &index, const std::vector<size_t> &shape)

Converts a multi-dimensional index into a linear index.

Note

This function is the inverse of UnravelIndex().

Parameters
  • index – Multi-index to be raveled, expressed in row-major order.

  • shape – Size of each index dimension.

Returns

Linear index associated with the multi-index.