[GIT] ppl/ppl(sparse_matrices): Unlimited_Sparse_Row_Over_CO_Tree: use unordered iterators in normalize().

Module: ppl/ppl Branch: sparse_matrices Commit: 00e738c7423ee67d5fb85c92251aab37ec66c6dd URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=00e738c7423ee...
Author: Marco Poletti poletti.marco@gmail.com Date: Thu Apr 15 07:27:19 2010 +0200
Unlimited_Sparse_Row_Over_CO_Tree: use unordered iterators in normalize().
---
src/Unlimited_Sparse_Row_Over_CO_Tree.cc | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/Unlimited_Sparse_Row_Over_CO_Tree.cc b/src/Unlimited_Sparse_Row_Over_CO_Tree.cc index 5d2d708..db3d08a 100644 --- a/src/Unlimited_Sparse_Row_Over_CO_Tree.cc +++ b/src/Unlimited_Sparse_Row_Over_CO_Tree.cc @@ -71,11 +71,11 @@ PPL::Unlimited_Sparse_Row_Over_CO_Tree return true; }
-inline void +void PPL::Unlimited_Sparse_Row_Over_CO_Tree::normalize() { // Compute the GCD of all the coefficients. - const_iterator i = begin(); - const const_iterator i_end = end(); + unordered_const_iterator i = unordered_begin(); + unordered_const_iterator i_end = unordered_end(); PPL_DIRTY_TEMP_COEFFICIENT(gcd); for ( ; i != i_end; ++i) { const Coefficient& x_i = i->second; @@ -113,7 +113,8 @@ PPL::Unlimited_Sparse_Row_Over_CO_Tree::normalize() { } } // Divide the coefficients by the GCD. - for (iterator j = begin(), j_end = end(); j != j_end; ++j) { + for (unordered_iterator j = unordered_begin(), j_end = unordered_end(); + j != j_end; ++j) { Coefficient& x_j = j->second; exact_div_assign(x_j, x_j, gcd); }
participants (1)
-
Marco Poletti