]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
added empty() function
authorbrian <brian@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 22 May 2003 15:13:39 +0000 (15:13 +0000)
committerbrian <brian@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 22 May 2003 15:13:39 +0000 (15:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@7669 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/pointer_matrix.h

index 2d8b5eb42c58c53e1a977c3497e1b671ade3ec0c..e659c9082cb41151229925c4498b472ebd7522de 100644 (file)
@@ -95,6 +95,12 @@ public:
                                    */
   PointerMatrix (const MATRIX* M=0);
 
+                                    /**
+                                     * Return whether the object is
+                                     * empty. 
+                                     */
+  bool empty () const;
+
                                   /**
                                    * Assign a new matrix
                                    * pointer. Deletes the old pointer
@@ -159,6 +165,16 @@ PointerMatrix<MATRIX, VECTOR>::operator= (const MATRIX* M)
   return *this;
 }
 
+
+template<class MATRIX, class VECTOR>
+inline bool
+PointerMatrix<MATRIX, VECTOR>::empty () const
+{
+  if (m == 0)
+    return true;
+  return m->empty();
+}
+
 template<class MATRIX, class VECTOR>
 inline void
 PointerMatrix<MATRIX, VECTOR>::vmult (VECTOR& dst,

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.