From 42e729d20000eb141b2907ad83630af34f4afea3 Mon Sep 17 00:00:00 2001 From: Carlo Zancanaro Date: Mon, 6 Aug 2012 22:58:29 +1000 Subject: New variation on the equation system solver. Much simpler to understand. Basically have a variable assignment which is dynamic and updates with the strategy changes. Similarly have strategy changes easily invalidate the variable assignment. This makes them strongly inter-dependent, but simplifies the implementation considerably. Proving it should be easier like this, too. --- impl/EquationSystem.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'impl/EquationSystem.hpp') diff --git a/impl/EquationSystem.hpp b/impl/EquationSystem.hpp index f5f87c3..4bae53a 100644 --- a/impl/EquationSystem.hpp +++ b/impl/EquationSystem.hpp @@ -117,7 +117,7 @@ struct EquationSystem { void indexMaxExpressions() { _expr_to_var = new IdMap,Variable*>(maxExpressionCount(), NULL); for (unsigned int i = 0, length = _right_sides.size(); i < length; ++i) { - (*_expr_to_var)[*_right_sides[i]] = _variables[i]; + _right_sides[i]->mapTo(*_variables[i], *_expr_to_var); } } -- cgit v1.2.3