summaryrefslogtreecommitdiff
path: root/dtrain/dtrain.h
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2011-09-25 22:59:24 +0200
committerPatrick Simianer <p@simianer.de>2011-09-25 22:59:24 +0200
commit899a30eb4e53d539ee0b846f38d7524fec811864 (patch)
tree77d02d7c6746b8d5249bca9900fdaef4c15ccf77 /dtrain/dtrain.h
parentec8e1b92b0a898754eb11d72741c8af39854c706 (diff)
size_t -> unsigned
Diffstat (limited to 'dtrain/dtrain.h')
-rw-r--r--dtrain/dtrain.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/dtrain/dtrain.h b/dtrain/dtrain.h
index 9bc5be93..ed75a297 100644
--- a/dtrain/dtrain.h
+++ b/dtrain/dtrain.h
@@ -18,8 +18,8 @@
#include "ksampler.h"
#include "pairsampling.h"
-#define DTRAIN_DOTS 100 // when to display a '.'
-#define DTRAIN_TMP_DIR "/var/hadoop/mapred/local" // put this on a SSD?
+#define DTRAIN_DOTS 100 // when to display a '.'
+#define DTRAIN_TMP_DIR "/tmp"
#define DTRAIN_GRAMMAR_DELIM "########EOS########"
using namespace std;
@@ -36,20 +36,20 @@ inline ostream& _p(ostream& out) { return out << setiosflags(ios::showpos); }
inline ostream& _p2(ostream& out) { return out << setprecision(2); }
inline ostream& _p5(ostream& out) { return out << setprecision(5); }
inline ostream& _p9(ostream& out) { return out << setprecision(9); }
-inline void strsplit(string &s, vector<string>& v, char d = '\t', size_t parts = 0) {
+inline void strsplit(string &s, vector<string>& v, char d = '\t', unsigned parts = 0) {
stringstream ss(s);
string t;
- size_t c = 0;
+ unsigned i = 0;
while(true)
{
- if (parts > 0 && c == parts-1) {
+ if (parts > 0 && i == parts-1) {
getline(ss, t);
v.push_back(t);
break;
}
if (!getline(ss, t, d)) break;
v.push_back(t);
- c++;
+ i++;
}
}