diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-04-27 16:07:12 +0200 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-04-27 16:07:12 +0200 |
commit | c7ac569634c07de169a91c9f4d028ecd3899b4df (patch) | |
tree | 4e7ba79ba4265b8e54da3dad21e6398116f94153 /dtrain/dtrain.h | |
parent | 0ac66e310d57f9aea5ddeea900c84df08abfe8c2 (diff) |
improved readability, fixes
Diffstat (limited to 'dtrain/dtrain.h')
-rw-r--r-- | dtrain/dtrain.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dtrain/dtrain.h b/dtrain/dtrain.h index 7b03d258..15d32e36 100644 --- a/dtrain/dtrain.h +++ b/dtrain/dtrain.h @@ -13,7 +13,7 @@ #include "filelib.h" -//#define DTRAIN_LOCAL +#define DTRAIN_LOCAL #define DTRAIN_DOTS 10 // after how many inputs to display a '.' #define DTRAIN_GRAMMAR_DELIM "########EOS########" @@ -85,7 +85,8 @@ inline void printWordIDVec(vector<WordID>& v) } template<typename T> -inline T sign(T z) { +inline T sign(T z) +{ if (z == 0) return 0; return z < 0 ? -1 : +1; } |