From 1bf6761d36d4a08c1ebe3c496cefb3c7569ba95e Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 1 May 2012 00:01:23 +1000 Subject: Update the example to be the one from the paper. --- impl/Operator.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'impl/Operator.hpp') diff --git a/impl/Operator.hpp b/impl/Operator.hpp index 71a1e68..2c5af75 100644 --- a/impl/Operator.hpp +++ b/impl/Operator.hpp @@ -59,10 +59,13 @@ struct Constant : public Operator { }; template -struct Increment: public Operator { +struct Addition: public Operator { + Addition(int i) : _value(i) { } T operator() (const std::vector< Expression* >& args, const VariableAssignment& ass) const { - return (*args[0])(ass) + 1; + return (*args[0])(ass) + _value; } + private: + int _value; }; #include "VariableAssignment.hpp" -- cgit v1.2.3