HOG2
MR1Permutation.h
Go to the documentation of this file.
1 //
2 // MR1Permutation.h
3 // hog2 glut
4 //
5 // Created by Nathan Sturtevant on 6/19/16.
6 // Copyright © 2016 University of Denver. All rights reserved.
7 //
8 
9 #ifndef MR1Permutation_h
10 #define MR1Permutation_h
11 
12 #include <stdio.h>
13 #include <vector>
14 #include <stdint.h>
15 
17 public:
18  uint64_t Rank(int *items, int *dual, int k, int N) const;
19  void Unrank(uint64_t hash, int *items, int *dual, int k, int N) const;
20  uint64_t Rank(uint8_t *items, uint8_t *dual, int k, int N) const;
21 };
22 
23 
24 //class MR1Permutation {
25 //public:
26 // MR1Permutation(std::vector<int> distincts, int permSize, int maxNumThreads);
27 // uint64_t GetMaxRank() const;
28 // uint64_t GetRank(const std::vector<int> &items, int threadID = 0) const;
29 // uint64_t GetRank(const std::vector<int> &items, int threadID = 0);
30 // void Unrank(uint64_t hash, std::vector<int> &items, int threadID = 0) const;
31 //private:
32 // std::vector<int> distinct;
33 // size_t puzzleSize;
34 // size_t distinctSize;
35 // uint64_t maxRank;
36 //
37 // // cache for computing ranking/unranking
38 // mutable std::vector<std::vector<int> > dualCache;
39 // mutable std::vector<std::vector<int> > locsCache;
40 // mutable std::vector<std::vector<int> > valueStack;
41 //};
42 
43 #endif /* MR1Permutation_h */
MR1KPermutation
Definition: MR1Permutation.h:16
MR1KPermutation::Unrank
void Unrank(uint64_t hash, int *items, int *dual, int k, int N) const
Given the hash returns the state and its dual.
Definition: MR1Permutation.cpp:68
MR1KPermutation::Rank
uint64_t Rank(int *items, int *dual, int k, int N) const
Definition: MR1Permutation.cpp:21