From b125691ed63b260171258d40206bc04e1565bf7b Mon Sep 17 00:00:00 2001 From: hartmann Date: Tue, 16 Mar 2004 11:44:21 +0000 Subject: [PATCH] Implement missing SparseMatrix::const_iterator postfix increment. git-svn-id: https://svn.dealii.org/trunk@8767 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/sparse_matrix.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/deal.II/lac/include/lac/sparse_matrix.h b/deal.II/lac/include/lac/sparse_matrix.h index bd712a70a1..d913b2af2a 100644 --- a/deal.II/lac/include/lac/sparse_matrix.h +++ b/deal.II/lac/include/lac/sparse_matrix.h @@ -1587,6 +1587,26 @@ SparseMatrix::const_iterator::operator++ () } +template +inline +typename SparseMatrix::const_iterator +SparseMatrix::const_iterator::operator++ (int) +{ + Assert (accessor.a_row < accessor.matrix->m(), ExcIteratorPastEnd()); + + typename SparseMatrix::const_iterator iter=*this; + + ++accessor.a_index; + if (accessor.a_index >= + accessor.matrix->get_sparsity_pattern().row_length(accessor.a_row)) + { + accessor.a_index = 0; + accessor.a_row++; + } + return iter; +} + + template inline const typename SparseMatrix::const_iterator::Accessor & -- 2.39.5