]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add operator> to sparse matrix iterators.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 2 Mar 2005 00:36:11 +0000 (00:36 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 2 Mar 2005 00:36:11 +0000 (00:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@9939 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.html
deal.II/lac/include/lac/sparse_matrix.h

index a579ff7b5fa33742db3d7d4aaeca3795d860dfb9..78cba7719d22ada5e9cbe492acbfadbe487fc9bd 100644 (file)
@@ -64,6 +64,14 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>lac</h3>
 
 <ol>
+  <li> <p>
+       New: The <code>SparseMatrix</code> iterators had no <code>operator
+       &gt;</code>, only an <code>operator &lt;</code>. The missing operator
+       is now implemented.
+       <br> 
+       (WB, 2005/03/01)
+       </p>
+
 </ol>
 
 
index f2a83f5d25adc5aa0d5b11d6a83ae11825fd7506..c864f4ffbf396ff96a05991679fb80c915887863 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -362,12 +362,10 @@ namespace internals
        bool operator != (const Iterator &) const;
 
                                          /**
-                                          * Comparison
-                                          * operator. Result is true
-                                          * if either the first row
-                                          * number is smaller or if
-                                          * the row numbers are
-                                          * equal and the first
+                                          * Comparison operator. Result is
+                                          * true if either the first row
+                                          * number is smaller or if the row
+                                          * numbers are equal and the first
                                           * index is smaller.
                                           *
                                           * This function is only valid if
@@ -376,6 +374,13 @@ namespace internals
                                           */
        bool operator < (const Iterator &) const;
 
+                                         /**
+                                          * Comparison operator. Works in the
+                                          * same way as above operator, just
+                                          * the other way round.
+                                          */
+       bool operator > (const Iterator &) const;
+        
       private:
                                          /**
                                           * Store an object of the
@@ -2174,6 +2179,16 @@ namespace internals
       
       return (accessor < other.accessor);
     }
+
+
+    template <typename number, bool Constness>
+    inline
+    bool
+    Iterator<number,Constness>::
+    operator > (const Iterator& other) const
+    {
+      return !((*this < other) || (*this == other));
+    }
     
   }
 }

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.