-
Notifications
You must be signed in to change notification settings - Fork 0
/
Subarray.h
34 lines (28 loc) · 833 Bytes
/
Subarray.h
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
#ifndef _SUBARRAY_H
#define _SUBARRAY_H
#include <string>
#include <vector>
#include "Indexer.h"
using namespace std;
class Subarray {
public:
string name;
Indexer * indexer;
// xstart, xend, ystart, yend, zstart, zend,...
// Inclusive
vector<int64_t> * subranges;
vector<int64_t> * ranges;
int64_t stride; // size of square
string outdir; // where output of query will end up
// Constructor
Subarray(string name, Indexer * indexer, vector<int64_t> * subranges, vector<int64_t> * ranges, int64_t stride);
// Destructor
~Subarray();
// Writes a new array in the corresponding subranges
// TODO: retile?
void execute();
private:
bool inRange(vector<int64_t> * coords);
void subarrayAttr(string tileid, vector<uint64_t> * cellNums, int attrIndex);
};
#endif