int vectorToIndex(const vector< int > &v, const vector< int > &sizes)
Maps a multi-index into a linear index over an array with the given dimension.
Definition: sgutilities.cpp:47
int indexToVector(int index, vector< int > &v, const vector< int > &sizes)
Maps a linear index into a multi-index over an array with the given dimension.
Definition: sgutilities.cpp:25