forked from Submitty/Submitty
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmetaData.h
57 lines (41 loc) · 1.11 KB
/
metaData.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* FILENAME: metaData.h
* YEAR: 2014
* AUTHORS: Please refer to 'AUTHORS.md' for a list of contributors
* LICENSE: Please refer to 'LICENSE.md' for the conditions of using this code
*
* RELEVANT DOCUMENTATION:
*/
#ifndef differences_metaData_h
#define differences_metaData_h
#include <ostream>
#include <string>
#include <vector>
template<class T> class metaData {
public:
metaData ();
std::vector< std::vector< int > > snakes;
std::vector< std::vector< int > > snapshots;
T const *a;
T const *b;
int m;
int n;
int distance;
};
template<class T> metaData< T >::metaData () :
a( NULL ), b( NULL ), m( 0 ), n( 0 ), distance( 0 ) {
}
// for printing snakes & snapshots
inline std::ostream& operator<<(std::ostream &ostr, const std::vector< std::vector< int > > &data) {
for (int i = 0; i < data.size(); i++) {
ostr << i << " : ";
for (int j = 0; j < data[i].size(); j++) {
ostr << " " << data[i][j];
}
ostr << std::endl;
}
return ostr;
}
//inline std::ostream& operator<<(std::ostream &ostr, const metaData<char> md) {
//return ostr;
//}
#endif