00001 #ifndef _HILBERT_H 00002 #define _HILBERT_H 00003 00004 #include <vector> 00005 using namespace std; 00006 00007 /* 00008 * map a point with index of i on Hilbert walk in dim dimensions to its coordinate, return this coord 00009 */ 00010 extern vector<int> int_to_Hilbert(int i, int dim) ; 00011 00012 /* 00013 * map a point with coordinate 'coords' to its linearized index on Hilbert walk , return this value 00014 */ 00015 extern int Hilbert_to_int(const vector<int>& coords, int dim); 00016 00017 #endif