-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathresultvector.h
More file actions
37 lines (32 loc) · 774 Bytes
/
resultvector.h
File metadata and controls
37 lines (32 loc) · 774 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef resultvector_H
#define resultvector_H
#include <vector>
#include <unordered_map>
#include <map>
using std::unordered_map;
using std::map;
using std::vector;
using std::pair;
const size_t CACHESIZE = 32;
class ResultVector
{
private:
void flush();
unordered_map<long,long> vectors; // most used how to speed up?
// crashes if made a map why?
long cache[CACHESIZE];
long execution_count;
size_t index;
public:
ResultVector(){execution_count=0; index=0;};
void addToDepth(long depth);
long readDepthCount(long depth);
const bool isSingle();
const bool isZero();
void sortedVectors(vector<pair<long,long> > &sorted_vectors);
bool vectorsGreater(int minVector);
void clear();
long getExecutionCount();
void printVector(FILE *out);
};
#endif