]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Mark old constructors of iterators as deprecated. Remove private nth_entry_in_row...
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Feb 2013 09:48:24 +0000 (09:48 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 12 Feb 2013 09:48:24 +0000 (09:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@28319 0785d39b-7218-0410-832d-ea1e28bc413d

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

index 83e29e38b20f1c4f51e8af99596bfe8f799cf494..41b672c7b1211bdb3000e6edb8bf0069c4369750 100644 (file)
@@ -93,10 +93,13 @@ namespace SparseMatrixIterators
 
     /**
      * Constructor.
+     *
+     * @deprecated This constructor is deprecated. Use the other constructor
+     * with a global index instead.
      */
     Accessor (MatrixType         *matrix,
               const unsigned int  row,
-              const unsigned int  index);
+              const unsigned int  index) DEAL_II_DEPRECATED;
 
     /**
      * Constructor.
@@ -338,10 +341,13 @@ namespace SparseMatrixIterators
     /**
      * Constructor. Create an iterator into the matrix @p matrix for the given
      * row and the index within it.
+     *
+     * @deprecated This constructor is deprecated. Use the other constructor
+     * with a global index instead.
      */
     Iterator (MatrixType        *matrix,
               const unsigned int row,
-              const unsigned int index);
+              const unsigned int index) DEAL_II_DEPRECATED;
 
     /**
      * Constructor. Create an iterator into the matrix @p matrix for the given
@@ -1580,16 +1586,6 @@ private:
    */
   std::size_t max_len;
 
-  /**
-   * Return the value of the <tt>index</tt>th entry in <tt>row</tt>. Here,
-   * <tt>index</tt> refers to the internal representation of the matrix, not
-   * the column. This is an internal function because it exposes the actual
-   * format in which data is stored -- be sure to understand what you are
-   * doing here.
-   */
-  number nth_entry_in_row (const unsigned int row,
-                           const unsigned int index) const;
-
   // make all other sparse matrices friends
   template <typename somenumber> friend class SparseMatrix;
   template <typename somenumber> friend class SparseLUDecomposition;
@@ -1912,25 +1908,12 @@ inline
 number
 SparseMatrix<number>::raw_entry (const unsigned int row,
                                  const unsigned int index) const
-{
-  // this is the (deprecated) public version of the
-  // nth_entry_in_row() function. this function will soon
-  // go away.
-  return nth_entry_in_row (row, index);
-}
-
-
-
-template <typename number>
-inline
-number
-SparseMatrix<number>::nth_entry_in_row (const unsigned int row,
-                                        const unsigned int index) const
 {
   Assert(row<cols->rows, ExcIndexRange(row,0,cols->rows));
   Assert(index<cols->row_length(row),
          ExcIndexRange(index,0,cols->row_length(row)));
 
+  // this function will soon go away.
   return val[cols->rowstart[row]+index];
 }
 
index 5bd0e75728d009b027f2b62d74f755c644a8e69a..738776bc984d85bd6b4790c87f8ee4343354d553 100644 (file)
@@ -107,10 +107,13 @@ namespace SparsityPatternIterators
   public:
     /**
      * Constructor.
+     *
+     * @deprecated This constructor is deprecated. Use the other constructor
+     * with a global index instead.
      */
     Accessor (const SparsityPattern *matrix,
               const unsigned int     row,
-              const unsigned int     index);
+              const unsigned int     index) DEAL_II_DEPRECATED;
 
     /**
      * Constructor.
@@ -229,10 +232,13 @@ namespace SparsityPatternIterators
     /**
      * Constructor. Create an iterator into the sparsity pattern @p sp for the
      * given row and the index within it.
+     *
+     * @deprecated This constructor is deprecated. Use the other constructor
+     * with a global index instead.
      */
     Iterator (const SparsityPattern *sp,
               const unsigned int     row,
-              const unsigned int     index);
+              const unsigned int     index) DEAL_II_DEPRECATED;
 
     /**
      * Constructor. Create an iterator into the sparsity pattern @p sp for the

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.