diff --git a/lib/Lexicographic.h b/lib/Lexicographic.h new file mode 100644 index 00000000..2d4e5df5 --- /dev/null +++ b/lib/Lexicographic.h @@ -0,0 +1,32 @@ +#ifndef GRID_LEXICOGRAPHIC_H +#define GRID_LEXICOGRAPHIC_H + + +namespace Grid{ + + class Lexicographic { + public: + + static inline void CoorFromIndex (std::vector& coor,int index,std::vector &dims){ + int nd= dims.size(); + coor.resize(nd); + for(int d=0;d& coor,int &index,std::vector &dims){ + int nd=dims.size(); + int stride=1; + index=0; + for(int d=0;d