From 18a747edd76918e2a1a4fb608b2d3923fcc535fa Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Tue, 16 Oct 2012 13:26:07 +1100 Subject: A quick fix to the solver. --- impl/Expression.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'impl/Expression.hpp') diff --git a/impl/Expression.hpp b/impl/Expression.hpp index 00bc9cd..0d48d70 100644 --- a/impl/Expression.hpp +++ b/impl/Expression.hpp @@ -27,6 +27,10 @@ struct Expression { return NULL; } + virtual MaxExpression* toMaxExpression() { + return NULL; + } + virtual Domain eval(const VariableAssignment&) const = 0; virtual Domain eval(const VariableAssignment& rho, const MaxStrategy&) const { @@ -145,6 +149,10 @@ struct MaxExpression : public OperatorExpression { MaxExpression(const unsigned int& id, const Maximum& op, const std::vector*>& arguments) : OperatorExpression(op, arguments), _id(id) { } + MaxExpression* toMaxExpression() { + return this; + } + const MaxExpression* toMaxExpression() const { return this; } -- cgit v1.2.3