]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix index types
authorTimo Heister <timo.heister@gmail.com>
Fri, 8 Nov 2019 16:16:07 +0000 (11:16 -0500)
committerTimo Heister <timo.heister@gmail.com>
Fri, 8 Nov 2019 16:18:33 +0000 (11:18 -0500)
include/deal.II/base/index_set.h

index a240e65673f595f4de8c3d588b827fe05830f4b1..628185e8b678924584e971da9ffd05acd5424210 100644 (file)
@@ -261,7 +261,7 @@ public:
    * n_elements().
    */
   size_type
-  nth_index_in_set(const unsigned int local_index) const;
+  nth_index_in_set(const size_type local_index) const;
 
   /**
    * Return the how-manyth element of this set (counted in ascending order) @p
@@ -286,8 +286,15 @@ public:
   /**
    * This function returns the local index of the beginning of the largest
    * range.
+   *
+   * In other words, the return value is nth_index_in_set(x), where x is the
+   * index of the largest contiguous range of indices in the IndexSet. The value
+   * is therefore equal to the number of elements in the set that come before
+   * the largest range.
+   *
+   * This call assumes that the IndexSet is nonempty.
    */
-  unsigned int
+  size_type
   largest_range_starting_index() const;
 
   /**
@@ -1829,7 +1836,7 @@ IndexSet::n_intervals() const
 
 
 
-inline unsigned int
+inline IndexSet::size_type
 IndexSet::largest_range_starting_index() const
 {
   Assert(ranges.empty() == false, ExcMessage("IndexSet cannot be empty."));
@@ -1844,7 +1851,7 @@ IndexSet::largest_range_starting_index() const
 
 
 inline IndexSet::size_type
-IndexSet::nth_index_in_set(const unsigned int n) const
+IndexSet::nth_index_in_set(const size_type n) const
 {
   Assert(n < n_elements(), ExcIndexRangeType<size_type>(n, 0, n_elements()));
 

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.