diff options
author | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-22 14:44:57 +1100 |
---|---|---|
committer | Carlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au> | 2012-10-22 14:44:57 +1100 |
commit | 86ca7448849aaaea6db34b1d2bcf8d99d7d7b12c (patch) | |
tree | acc843137f53cfc8cb2b847374c3d06789a9505e /impl/Complete.hpp | |
parent | 39bcfdc55a09e437482768903f6093ab1dd60a61 (diff) |
Okay, the solver is now correct.
It runs in two separate passes:
- improve strategy (for all)
- evaluate fixpoint
Unfortunately this loses out on locality at the moment.
I really want a local solver, so I'll have to see what I can do about
that.
Diffstat (limited to 'impl/Complete.hpp')
-rw-r--r-- | impl/Complete.hpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/impl/Complete.hpp b/impl/Complete.hpp index 8c5559a..e3ec15a 100644 --- a/impl/Complete.hpp +++ b/impl/Complete.hpp @@ -40,7 +40,11 @@ struct Complete { return Complete<T>(- _value, _infinity); } Complete operator+(const Complete& other) const { - if (_infinity) { + if (_infinity && other._infinity) { + if (_value > 0 || other._value > 0) + return Complete<T>(1, true); + return Complete<T>(-1, true); + } else if (_infinity) { return *this; } else if (other._infinity) { return other; |