diff options
author | jfouet <jfouet@1f5c12ca-751b-0410-a591-d2e778427230> | 2008-05-16 16:35:17 +0400 |
---|---|---|
committer | jfouet <jfouet@1f5c12ca-751b-0410-a591-d2e778427230> | 2008-05-16 16:35:17 +0400 |
commit | 044a43b5121742c4f372a71e83f6f9632f5752c4 (patch) | |
tree | a41cd31611f6d4ef013540c30bad8a7184b7f0a0 /mert | |
parent | 740b9574729b71bec8b3ce4082b2486e1880896c (diff) |
add init.opt file
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1731 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'mert')
-rw-r--r-- | mert/FeatureData.h | 16 | ||||
-rwxr-xr-x | mert/Makefile | 3 | ||||
-rw-r--r-- | mert/Optimizer.cpp | 2 | ||||
-rw-r--r-- | mert/init.opt | 1 |
4 files changed, 18 insertions, 4 deletions
diff --git a/mert/FeatureData.h b/mert/FeatureData.h index 851ba2358..a9368e3c5 100644 --- a/mert/FeatureData.h +++ b/mert/FeatureData.h @@ -35,8 +35,20 @@ public: inline void clear() { array_.clear(); } - inline FeatureArray& get(int i){ return array_.at(i); } - inline const FeatureArray& get(int i)const{ return array_.at(i); } + inline FeatureArray& get(int i){ +#ifdef DEBUG + return array_.at(i); +#else + return array_[i]; +#endif + } + inline const FeatureArray& get(int i)const{ +#ifdef DEBUG + return array_.at(i); +#else + return array_[i]; +#endif + } inline bool exists(int i){ return (i<array_.size())?true:false; } inline void setIndex(){ }; diff --git a/mert/Makefile b/mert/Makefile index e76fed360..8623f09e5 100755 --- a/mert/Makefile +++ b/mert/Makefile @@ -11,7 +11,8 @@ Scorer.o ifndef DEBUG CFLAGS=-O3 -DTRACE_ENABLE else -CFLAGS=-DTRACE_ENABLE -g +CFLAGS=-DTRACE_ENABLE -g -DDEBUG + endif GCC=g++ diff --git a/mert/Optimizer.cpp b/mert/Optimizer.cpp index a150b0efe..85f4c3ed8 100644 --- a/mert/Optimizer.cpp +++ b/mert/Optimizer.cpp @@ -289,7 +289,7 @@ statscore_t SimpleOptimizer::TrueRun(Point& P)const{ for(int d=0;d<Point::getdim();d++){ if(verboselevel()>3) - cerr<<"minimizing along direction"<<d<<endl; + cerr<<"minimizing along direction "<<d<<endl; Point direction; direction[d]=1.0; statscore_t curscore=LineOptimize(P,direction,linebest);//find the minimum on the line diff --git a/mert/init.opt b/mert/init.opt new file mode 100644 index 000000000..32ab00796 --- /dev/null +++ b/mert/init.opt @@ -0,0 +1 @@ +0.1 0.1 0.3 0.4 0.7 0.5 0.01 0.02 0.1 0.1 0.3 0.4 0.7 9
\ No newline at end of file |