diff options
author | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-27 19:26:31 +0000 |
---|---|---|
committer | graehl <graehl@ec762483-ff6d-05da-a07a-a48fb63a330f> | 2010-08-27 19:26:31 +0000 |
commit | 1eab70e16f0e0d5531f3babfea2062c82f6362e1 (patch) | |
tree | a1ea1930e585b9356c6e089465baa969bb6919bb /utils/max_plus.h | |
parent | 6ddaff1341e565dd91dca7ea763d0ea4d897f4c7 (diff) |
compiles
git-svn-id: https://ws10smt.googlecode.com/svn/trunk@626 ec762483-ff6d-05da-a07a-a48fb63a330f
Diffstat (limited to 'utils/max_plus.h')
-rwxr-xr-x | utils/max_plus.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/utils/max_plus.h b/utils/max_plus.h index 2c55b33c..2e56f85e 100755 --- a/utils/max_plus.h +++ b/utils/max_plus.h @@ -19,10 +19,23 @@ #include <cassert> #include <limits> #include "semiring.h" +#include "show.h" +//#include "logval.h" template <class T> class MaxPlus { public: + void print(std::ostream &o) const { + o<<v_; + } + PRINT_SELF(MaxPlus<T>) + template <class O> + void operator=(O const& o) { + v_=o.v_; + } + template <class O> + MaxPlus(O const& o) : v_(o.v_) { } + typedef MaxPlus<T> Self; MaxPlus() : v_(LOGVAL_LOG0) {} explicit MaxPlus(double x) : v_(std::log(x)) {} |