[GIT] ppl/ppl(sparse_matrices): Replaced the algorithm used for sorting Linear_System and Bit_Matrix.

Module: ppl/ppl Branch: sparse_matrices Commit: 8adce40966f7c9aa54c2fc04dd27acac97ab1eb9 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=8adce40966f7c...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Thu Feb 17 21:15:28 2011 +0100
Replaced the algorithm used for sorting Linear_System and Bit_Matrix.
The new algorithm, based on STL's std::sort and std::unique, is applied to a vector of rows' indices and implements indirect sort using function objects for the comparisons and swap operations. Apart from a (usually minor) decrease in the number of comparisons and swaps perfomed, the new algorithm should be better wrt the consumption of stack space, by getting rid of ad-hoc sort/unique functions, as well as the special-purpose iterator class Linear_System::With_Bit_Matrix_iterator.
---
src/Bit_Matrix.cc | 26 +++-- src/Linear_System.defs.hh | 91 ---------------- src/Linear_System.inlines.hh | 164 ----------------------------- src/Linear_System.templates.hh | 54 ++++++---- src/Swapping_Vector.defs.hh | 1 + src/swapping_sort.icc | 226 +++++++++++++++++++++------------------ 6 files changed, 172 insertions(+), 390 deletions(-)
Diff: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commitdiff;h=8adce4096...
participants (1)
-
Enea Zaffanella