summaryrefslogtreecommitdiff
path: root/impl
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@carlo-laptop>2012-10-31 00:50:29 +1100
committerCarlo Zancanaro <carlo@carlo-laptop>2012-10-31 00:50:29 +1100
commite207a8fec1bae01068bdb3a27a2090a4af5f8cb2 (patch)
treeccba94b8752a1ecd47f800bf15407c1aa5d418eb /impl
parent3d372ecf513c951675602286b296f7af520bb3cf (diff)
Remove _var_influence and do some writeup
_var_influence was really just duplicating data that was available elsewhere, so I got rid of it. I also did some writing about the algorithm and stuff for the thesis.
Diffstat (limited to 'impl')
-rw-r--r--impl/MaxStrategy.hpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/impl/MaxStrategy.hpp b/impl/MaxStrategy.hpp
index 5534597..71ea4f4 100644
--- a/impl/MaxStrategy.hpp
+++ b/impl/MaxStrategy.hpp
@@ -40,8 +40,6 @@ struct DynamicMaxStrategy : public MaxStrategy<Domain> {
_stable(system.maxExpressionCount()),
_influence(system.maxExpressionCount(),
IdSet<MaxExpression<Domain> >(system.maxExpressionCount())),
- _var_influence(system.variableCount(),
- IdSet<MaxExpression<Domain> >(system.maxExpressionCount())),
_changed(false)
{}
@@ -70,9 +68,8 @@ struct DynamicMaxStrategy : public MaxStrategy<Domain> {
void invalidate(const Variable<Domain>& v) {
log::strategy << indent() << "Invalidating " << v << " - " << *_system[v] << std::endl;
- //log::debug << indent() << " var-influence sets " << _var_influence << std::endl;
- IdSet<MaxExpression<Domain> > infl = _var_influence[v];
+ IdSet<MaxExpression<Domain> > infl = _influence[*_system[v]];
for (typename IdSet<MaxExpression<Domain> >::iterator
it = infl.begin(),
end = infl.end();
@@ -154,7 +151,6 @@ private:
const Domain operator[](const Variable<Domain>& var) {
// solve the strategy for this variable, too
_strat.solve(*_strat._system[var]);
- _strat._var_influence[var].insert(_expr);
_strat._influence[*_strat._system[var]].insert(_expr);
return _rho[var];
}
@@ -190,7 +186,6 @@ private:
IdMap<MaxExpression<Domain>,unsigned int> _values;
IdSet<MaxExpression<Domain> > _stable;
IdMap<MaxExpression<Domain>,IdSet<MaxExpression<Domain> > > _influence;
- IdMap<Variable<Domain>,IdSet<MaxExpression<Domain> > > _var_influence;
bool _changed;
};