]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Implement missing SparseMatrix<number>::const_iterator postfix increment.
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Mar 2004 11:44:21 +0000 (11:44 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Mar 2004 11:44:21 +0000 (11:44 +0000)
git-svn-id: https://svn.dealii.org/trunk@8767 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparse_matrix.h

index bd712a70a1d7cf5748ee23d2c238a7ec61f29870..d913b2af2a81809a819c23af0843f2529cf019f6 100644 (file)
@@ -1587,6 +1587,26 @@ SparseMatrix<number>::const_iterator::operator++ ()
 }
 
 
+template <typename number>
+inline
+typename SparseMatrix<number>::const_iterator
+SparseMatrix<number>::const_iterator::operator++ (int)
+{
+  Assert (accessor.a_row < accessor.matrix->m(), ExcIteratorPastEnd());
+
+  typename SparseMatrix<number>::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 <typename number>
 inline
 const typename SparseMatrix<number>::const_iterator::Accessor &

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.