summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2014-07-29 15:02:43 +0200
committerPatrick Simianer <p@simianer.de>2014-07-29 15:02:43 +0200
commit689084212e7e3b124dba4512d1ee4e6f435a3612 (patch)
tree0b61b90fab3d4cef737ea168bb26f5d34d2ff087
parentc795be4ebdbdc37d3fd9ba63d70f0439407333e4 (diff)
fix
-rw-r--r--training/dtrain/dtrain.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/training/dtrain/dtrain.h b/training/dtrain/dtrain.h
index eb23b813..07bd9b65 100644
--- a/training/dtrain/dtrain.h
+++ b/training/dtrain/dtrain.h
@@ -116,11 +116,11 @@ 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 void printWordIDVec(vector<WordID>& v)
+inline void printWordIDVec(vector<WordID>& v, ostream& os=cerr)
{
for (unsigned i = 0; i < v.size(); i++) {
- cerr << TD::Convert(v[i]);
- if (i < v.size()-1) cerr << " ";
+ os << TD::Convert(v[i]);
+ if (i < v.size()-1) os << " ";
}
}