]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
New = operator
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Jun 1999 09:11:02 +0000 (09:11 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Jun 1999 09:11:02 +0000 (09:11 +0000)
git-svn-id: https://svn.dealii.org/trunk@1353 0785d39b-7218-0410-832d-ea1e28bc413d

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

index c6bcccb081c0b179ec3ea04e3f6478aee22d3440..9b7c83945b06736b7da434a0cf5f30c8ac6b4c1c 100644 (file)
@@ -609,6 +609,11 @@ class SparseMatrix : public Subscriptor
                                      * structure.
                                      */
     virtual ~SparseMatrix ();
+                                    /** 
+                                     * Pseudo operator only copying empty objects.
+                                     */
+    SparseMatrix<number>& operator = (const SparseMatrix<number> &);
+
     
 
                                     /**
@@ -1049,12 +1054,6 @@ class SparseMatrix : public Subscriptor
                                     // friends
     template <typename somenumber> friend class SparseMatrix<somenumber>;
 
-                                    /** 
-                                     * Made #operator =# private to
-                                     * avoid improper use.
-                                     */
-    SparseMatrix<number>& operator = (const SparseMatrix<number> &);
-
 };
 
 
index 5218fd84b0cd6faa8b004b994bb1733165a6500a..5818de14c40a4a4b57e926c3301fd28a89f7e5ea 100644 (file)
@@ -37,7 +37,17 @@ SparseMatrix<number>::SparseMatrix (const SparseMatrix &m) :
   Assert (m.max_len==0, ExcInvalidConstructorCall());
 };
 
+template <typename number>
+SparseMatrix<number>&
+SparseMatrix<number>::operator = (const SparseMatrix<number> &m)
+{
+  Assert (m.cols==0, ExcInvalidConstructorCall());
+  Assert (m.val==0, ExcInvalidConstructorCall());
+  Assert (m.max_len==0, ExcInvalidConstructorCall());
 
+  return *this;
+};
+  
 
 template <typename number>
 SparseMatrix<number>::SparseMatrix (const SparseMatrixStruct &c) :

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.