]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
vector2d::rowaccessor::size
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Jul 2002 13:36:07 +0000 (13:36 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Jul 2002 13:36:07 +0000 (13:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@6270 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/include/base/vector2d.h
deal.II/doc/news/2002/c-3-4.html

index 3a8123f26fc6177b5d5b6d3bc94743592a0d2885..abbf9ccde1b337fee1356433fd434743f44f4c7c 100644 (file)
@@ -105,6 +105,15 @@ class vector2d : public Subscriptor
                                          * this row.
                                          */
        const_iterator end () const;
+
+                                        /**
+                                         * Return the number of
+                                         * elements between @p{begin}
+                                         * and @p{end}, i.e. the
+                                         * number of columns of the
+                                         * matrix.
+                                         */
+       unsigned int size () const;
        
       protected:
                                         /**
@@ -206,6 +215,15 @@ class vector2d : public Subscriptor
                                          * version.
                                          */
        iterator end ();
+
+                                        /**
+                                         * Return the number of
+                                         * elements between @p{begin}
+                                         * and @p{end}, i.e. the
+                                         * number of columns of the
+                                         * matrix.
+                                         */
+       unsigned int size () const;
        
       private:
                                         /**
@@ -532,6 +550,16 @@ vector2d<T>::ConstRowAccessor::end () const
 
 
 
+template <typename T>
+inline
+unsigned int
+vector2d<T>::ConstRowAccessor::size () const
+{
+  return parent.n_cols();
+};
+
+
+
 template <typename T>
 inline
 vector2d<T>::NonConstRowAccessor::
@@ -588,6 +616,16 @@ vector2d<T>::NonConstRowAccessor::end ()
 
 
 
+template <typename T>
+inline
+unsigned int
+vector2d<T>::NonConstRowAccessor::size () const
+{
+  return parent.n_cols();
+};
+
+
+
 template <typename T>
 inline
 vector2d<T>::~vector2d ()
index 739cf1fd1146c3d72afdeecca98e99c1380d5528..3cfcd15f6ab12cf150f13e0ac91c874315cd865e 100644 (file)
@@ -95,6 +95,15 @@ contributor's names are abbreviated by WB (Wolfgang Bangerth), GK
 <h3>base</h3>
 
 <ol>
+  <li> <p> 
+       New: Row accessors for the <code class="class">vector2d</code>
+       class now have a member function <code
+       class="member">size</code> that returns the size of the row,
+       i.e. the number of columns of the table.
+       <br>
+       (WB 2002/07/24)
+       </p>
+
   <li> <p> 
        Fixed: In EPS output, colors were set to invalid values if the
        values of the field that is used for coloring are all

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.