summaryrefslogtreecommitdiff
path: root/impl/FixpointAlgorithm.hpp
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-06-15 15:48:16 +1000
committerCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-06-15 15:48:16 +1000
commita61d8b829afab13593e254fc69e260b6346939dc (patch)
tree80718961a7242840db56eec82c792d7ca07eb654 /impl/FixpointAlgorithm.hpp
parente00d7e6486739221f4d5adea1583743d3e23acfd (diff)
Parameterise fixpoint and strategy improvement
(command-line arguments specify which to use) Also: - Fix up Complete<T> to work comparing `inf` to 1 (stupid bug) - Clean up the systems/ folder a bit - Change the printed output to differentiate variables and constants (!v/!c, respectively) - Perform a slight optimisation to the strategy-iteration process
Diffstat (limited to 'impl/FixpointAlgorithm.hpp')
-rw-r--r--impl/FixpointAlgorithm.hpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/impl/FixpointAlgorithm.hpp b/impl/FixpointAlgorithm.hpp
index 4c84ff2..b39a915 100644
--- a/impl/FixpointAlgorithm.hpp
+++ b/impl/FixpointAlgorithm.hpp
@@ -32,14 +32,13 @@ struct SmartFixpointAlgorithm : public FixpointAlgorithm<Domain> {
struct DynamicVariableAssignment : public VariableAssignment<Domain> {
DynamicVariableAssignment(const EquationSystem<Domain>& system)
: _system(system),
- _evaluating(NULL),
_values(system.variableCount(), infinity<Domain>()),
_stable(system.variableCount()),
- _haveValue(system.variableCount()),
_influence(system.variableCount(), IdSet<Variable<Domain> >(system.variableCount())) { }
const Domain& operator[](const Variable<Domain>& var) const {
solve(var);
+ //std::cout << _values << std::endl;
return _values[var];
}
@@ -81,10 +80,8 @@ struct SmartFixpointAlgorithm : public FixpointAlgorithm<Domain> {
};
const EquationSystem<Domain>& _system;
- mutable const Variable<Domain>* _evaluating;
mutable IdMap<Variable<Domain>,Domain> _values;
mutable IdSet<Variable<Domain> > _stable;
- mutable IdSet<Variable<Domain> > _haveValue;
mutable IdMap<Variable<Domain>,IdSet<Variable<Domain> > > _influence;
};