]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove operator=, add operator*, and fix typo in the documentation. 1722/head
authorBruno Turcksin <bruno.turcksin@gmail.com>
Mon, 12 Oct 2015 15:21:45 +0000 (10:21 -0500)
committerBruno Turcksin <bruno.turcksin@gmail.com>
Mon, 12 Oct 2015 15:21:45 +0000 (10:21 -0500)
include/deal.II/lac/vector_space_vector.h

index e2f9b02f528687f7f5b20120d042d57b3fb4722c..da404acd5cca2717f1e63d6bc0f15955b4ecdc75 100644 (file)
@@ -44,29 +44,34 @@ namespace LinearAlgebra
   class VectorSpaceVector
   {
   public:
+    typedef Number                                            value_type;
     typedef types::global_dof_index                           size_type;
     typedef typename numbers::NumberTraits<Number>::real_type real_type;
 
     /**
-     * Imports all the elements present in the vector's IndexSet from the input
-     * vector @p read_write_vector.
+     * Multiply the entire vector by a fixed factor.
      */
-    virtual VectorSpaceVector<Number> &operator= (const ReadWriteVector<Number> &read_write_vector) = 0;
+    virtual VectorSpaceVector<Number> &operator*= (const Number factor) = 0;
 
     /**
-     * Copies the data and the IndexSet of the input vector @p in_vector.
+     * Divide the entire vector by a fixed factor.
      */
-    virtual VectorSpaceVector<Number> &operator= (const VectorSpaceVector<Number> &in_vector) = 0;
+    virtual VectorSpaceVector<Number> &operator/= (const Number factor) = 0;
 
     /**
-     * Multiply the entire vector by a fixed factor.
+     * Add the vector @p V to the present one.
      */
-    virtual VectorSpaceVector<Number> &operator*= (const Number factor) = 0;
+    virtual VectorSpaceVector<Number> &operator+= (const VectorSpaceVector<Number> &V) = 0;
 
     /**
-     * Divide the entire vector by a fixed factor.
+     * Subtract the vector @p V from the present one.
      */
-    virtual VectorSpaceVector<Number> &operator/= (const Number factor) = 0;
+    virtual VectorSpaceVector<Number> &operator-= (const VectorSpaceVector<Number> &V) = 0;
+
+    /**
+     * Return the scalar product of two vectors.
+     */
+    virtual Number operator* (const VectorSpaceVector<Number> &V) = 0;
 
     /**
      * Simple addition of a multiple of a vector, i.e. <tt>*this += a*V</tt>.
@@ -76,7 +81,7 @@ namespace LinearAlgebra
     /**
      * Multiple addition of scaled vectors, i.e. <tt>*this += a*V+b*W</tt>.
      */
-    virtual void add(const Number a, const VectorSpaceVector<Number> &VW,
+    virtual void add(const Number a, const VectorSpaceVector<Number> &V,
                      const Number b, const VectorSpaceVector<Number> &W) = 0;
 
     /**

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.