summaryrefslogtreecommitdiff
path: root/impl/VariableAssignment.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'impl/VariableAssignment.hpp')
-rw-r--r--impl/VariableAssignment.hpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/impl/VariableAssignment.hpp b/impl/VariableAssignment.hpp
index ae5efd7..a1f0b5b 100644
--- a/impl/VariableAssignment.hpp
+++ b/impl/VariableAssignment.hpp
@@ -22,7 +22,7 @@ struct DynamicVariableAssignment : public VariableAssignment<Domain> {
const DynamicMaxStrategy<Domain>& strat
) : _system(system),
_strategy(strat),
- _values(system.variableCount(), infinity<Domain>()),
+ _values(system.variableCount(), unknown(infinity<Domain>())),
_stable(system.variableCount()),
_influence(system.variableCount(),
IdSet<Variable<Domain> >(system.variableCount()))
@@ -37,9 +37,20 @@ struct DynamicVariableAssignment : public VariableAssignment<Domain> {
log::fixpoint << indent() << "Invalidating " << x << std::endl;
if (_stable.contains(x)) {
_stable.remove(x);
- _values[x] = infinity<Domain>();
+ _values[x] = unknown(infinity<Domain>());
solve(x);
+ /*
+ IdSet<Variable<Domain> > infl = _influence[x];
+ _influence[x].clear();
+ for (typename IdSet<Variable<Domain> >::iterator
+ it = infl.begin(),
+ ei = infl.end();
+ it != ei;
+ ++it) {
+ invalidate(_system.variable(*it));
+ }
+ */
}
}
@@ -97,7 +108,9 @@ private:
const EquationSystem<Domain>& _system;
const DynamicMaxStrategy<Domain>& _strategy;
mutable IdMap<Variable<Domain>, Domain> _values;
+public:
mutable IdSet<Variable<Domain> > _stable;
+private:
mutable IdMap<Variable<Domain>,IdSet<Variable<Domain> > > _influence;
};