From: hartmann Date: Tue, 16 Mar 2004 11:44:21 +0000 (+0000) Subject: Implement missing SparseMatrix::const_iterator postfix increment. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b125691ed63b260171258d40206bc04e1565bf7b;p=dealii-svn.git Implement missing SparseMatrix::const_iterator postfix increment. git-svn-id: https://svn.dealii.org/trunk@8767 0785d39b-7218-0410-832d-ea1e28bc413d --- 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 &