diff options
author | Carlo Zancanaro <carlo@carlo-laptop> | 2012-04-19 16:21:26 +1000 |
---|---|---|
committer | Carlo Zancanaro <carlo@carlo-laptop> | 2012-04-19 16:21:26 +1000 |
commit | 2ee29b3426d2d79872fba35adbeb8d768983ffec (patch) | |
tree | c1c516816b7fa8d59bea445abd4505860be376bc /impl/Min.h | |
parent | 5d7252681da3b26845fc4e5dcf0b0e94ed9fabb1 (diff) |
Add presentation; start a different implementation
Diffstat (limited to 'impl/Min.h')
-rw-r--r-- | impl/Min.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/impl/Min.h b/impl/Min.h deleted file mode 100644 index 9f17545..0000000 --- a/impl/Min.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef MIN_H -#define MIN_H - -#include "Expression.h" - -template<class T> -struct Min : public Expression<T> { - Min(Expression<T>* left, Expression<T>* right) - : _left(left), _right(right) { } - - T eval(const std::map<std::string, T>& mappings) const { - T left = _left->eval(mappings); - T right = _right->eval(mappings); - return left < right ? left : right; - } - - private: - Expression<T>* _left; - Expression<T>* _right; -}; - -#endif |