03bd10624e1a8ca93247b873205b25b98672f036
[SXSI/TextCollection.git] / incbwt / misc / utils.h
1 #ifndef UTILS_H
2 #define UTILS_H
3
4 #include <fstream>
5 #include <vector>
6
7 #include "definitions.h"
8
9
10 namespace CSA
11 {
12
13
14
15 struct Triple
16 {
17   usint first;
18   usint second;
19   usint third;
20
21   Triple();
22   Triple(usint a, usint b, usint c);
23 };
24
25
26 std::streamoff fileSize(std::ifstream& file);
27 std::streamoff fileSize(std::ofstream& file);
28
29
30 std::ostream& operator<<(std::ostream& stream, pair_type data);
31
32
33 void readRows(std::ifstream& file, std::vector<std::string>& rows, bool skipEmptyRows);
34
35 double readTimer();
36
37
38 } // namespace CSA
39
40
41 #endif // UTILS_H