From: Timo Heister Date: Fri, 8 Nov 2019 16:16:07 +0000 (-0500) Subject: fix index types X-Git-Tag: v9.2.0-rc1~890^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbae23e8f6eaf4e0f1fef873f7d5ded1ecafb199;p=dealii.git fix index types --- diff --git a/include/deal.II/base/index_set.h b/include/deal.II/base/index_set.h index a240e65673..628185e8b6 100644 --- a/include/deal.II/base/index_set.h +++ b/include/deal.II/base/index_set.h @@ -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(n, 0, n_elements()));