Mercurial > hg > soniczoomios
comparison hilbert.h @ 37:8ed7522deaaa
Interpolation.
author | Robert Tubb <rt300@eecs.qmul.ac.uk> |
---|---|
date | Tue, 09 Apr 2013 17:14:31 +0100 |
parents | 790939017078 |
children | b91a1859829a |
comparison
equal
deleted
inserted
replaced
36:a42903c61558 | 37:8ed7522deaaa |
---|---|
17 | 17 |
18 | 18 |
19 | 19 |
20 class Hilbert{ | 20 class Hilbert{ |
21 private: | 21 private: |
22 | |
23 public: | |
24 int P; // dimensionas of high D space | 22 int P; // dimensionas of high D space |
25 int N; // number of resolution bits | 23 int N; // number of resolution bits |
26 int codeLength; | 24 int codeLength; |
27 vector<vector <bool> > cubeStartVertices; | 25 vector<vector <bool> > cubeStartVertices; |
28 vector<int> cubeRotations; | 26 vector<int> cubeRotations; |
29 vector<vector <bool> > theGrayCode; | 27 vector<vector <bool> > theGrayCode; |
30 vector<unsigned int> theGrayCodeD; | 28 vector<unsigned int> theGrayCodeD; |
31 | 29 |
32 void init(int N, int P); | 30 |
33 void makeCode(); | 31 void makeCode(); |
34 vector<int> calculateParamsFromIndex(unsigned long long coord); | 32 |
35 unsigned long long calculateIndexFromParams(vector<int> params); | |
36 void makeRotationRules(); | 33 void makeRotationRules(); |
37 int rotate(int vertex, int entryPoint, int direction); | 34 int rotate(int vertex, int entryPoint, int direction); |
38 int rotateInverse(int vertex, int entryPoint, int direction) ; | 35 int rotateInverse(int vertex, int entryPoint, int direction) ; |
36 public: | |
37 void init(int N, int P); | |
38 vector<int> calculateParamsFromIndex(unsigned long long coord); | |
39 unsigned long long calculateIndexFromParams(vector<int> params); | |
40 | |
39 }; | 41 }; |
40 | 42 |
41 | 43 |
42 | 44 |