]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Reorder functions so that inline functions are declared before they are called.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 29 Jun 2004 03:04:55 +0000 (03:04 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 29 Jun 2004 03:04:55 +0000 (03:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@9479 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/compressed_sparsity_pattern.h

index 80359e7592a1d3a1c345c7f8f90d1298e941750f..67e8df9e4375309003b705605914f949e3085a49 100644 (file)
@@ -455,95 +455,6 @@ class CompressedSparsityPattern : public Subscriptor
 /*---------------------- Inline functions -----------------------------------*/
 
 
-inline
-unsigned int
-CompressedSparsityPattern::n_rows () const
-{
-  return rows;
-}
-
-
-
-inline
-unsigned int
-CompressedSparsityPattern::n_cols () const
-{
-  return cols;
-}
-
-
-
-inline
-void
-CompressedSparsityPattern::add (const unsigned int i,
-                               const unsigned int j)
-{
-  Assert (i<rows, ExcInvalidIndex(i,rows));
-  Assert (j<cols, ExcInvalidIndex(j,cols));
-
-  lines[i].add (j);
-}
-
-
-
-inline
-CompressedSparsityPattern::Line::Line ()
-                :
-                cache_entries (0)
-{}
-
-
-
-inline
-unsigned int
-CompressedSparsityPattern::row_length (const unsigned int row) const
-{
-  Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
-  
-  lines[row].flush_cache ();
-  return lines[row].entries.size();
-}
-
-
-
-inline
-unsigned int
-CompressedSparsityPattern::column_number (const unsigned int row,
-                                         const unsigned int index) const
-{
-  Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
-  Assert (index < lines[row].entries.size(),
-         ExcIndexRange (index, 0, lines[row].entries.size()));
-
-  lines[row].flush_cache ();
-  return lines[row].entries[index];
-}
-
-
-
-inline
-void
-CompressedSparsityPattern::Line::add (const unsigned int j)
-{
-                                   // first check whether this entry is
-                                   // already in the cache. if so, we can
-                                   // safely return
-  for (unsigned int i=0; i<cache_entries; ++i)
-    if (cache[i] == j)
-      return;
-
-                                   // if not, see whether there is still some
-                                   // space in the cache. if not, then flush
-                                   // the cache first
-  if (cache_entries == cache_size)
-    flush_cache ();
-  
-  cache[cache_entries] = j;
-  ++cache_entries;
-}
-
-
-
 inline
 void
 CompressedSparsityPattern::Line::flush_cache () const
@@ -690,5 +601,94 @@ CompressedSparsityPattern::Line::flush_cache () const
 
 
 
+inline
+void
+CompressedSparsityPattern::Line::add (const unsigned int j)
+{
+                                   // first check whether this entry is
+                                   // already in the cache. if so, we can
+                                   // safely return
+  for (unsigned int i=0; i<cache_entries; ++i)
+    if (cache[i] == j)
+      return;
+
+                                   // if not, see whether there is still some
+                                   // space in the cache. if not, then flush
+                                   // the cache first
+  if (cache_entries == cache_size)
+    flush_cache ();
+  
+  cache[cache_entries] = j;
+  ++cache_entries;
+}
+
+
+
+inline
+unsigned int
+CompressedSparsityPattern::n_rows () const
+{
+  return rows;
+}
+
+
+
+inline
+unsigned int
+CompressedSparsityPattern::n_cols () const
+{
+  return cols;
+}
+
+
+
+inline
+void
+CompressedSparsityPattern::add (const unsigned int i,
+                               const unsigned int j)
+{
+  Assert (i<rows, ExcInvalidIndex(i,rows));
+  Assert (j<cols, ExcInvalidIndex(j,cols));
+
+  lines[i].add (j);
+}
+
+
+
+inline
+CompressedSparsityPattern::Line::Line ()
+                :
+                cache_entries (0)
+{}
+
+
+
+inline
+unsigned int
+CompressedSparsityPattern::row_length (const unsigned int row) const
+{
+  Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
+  
+  lines[row].flush_cache ();
+  return lines[row].entries.size();
+}
+
+
+
+inline
+unsigned int
+CompressedSparsityPattern::column_number (const unsigned int row,
+                                         const unsigned int index) const
+{
+  Assert (row < n_rows(), ExcIndexRange (row, 0, n_rows()));
+  Assert (index < lines[row].entries.size(),
+         ExcIndexRange (index, 0, lines[row].entries.size()));
+
+  lines[row].flush_cache ();
+  return lines[row].entries[index];
+}
+
+
+
 
 #endif

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.