Document the new DPF surfaces in one command set, and test the field, half-tree, and multipoint edges.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 23:18:10 -06:00
parent 0d8a5a8131
commit 0dff6df8ed
250 changed files with 12199 additions and 1981 deletions

View file

@ -1,7 +1,7 @@
/// @file grotto/offset_iterable.hpp
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @brief defines `dpf::rotated_iterable` and associated helpers
/// @details
/// @brief A sorted range shifted by a public offset, viewed through `rotation_iterable`.
/// @details The rotation starts at the first entry strictly greater than the offset.
/// @copyright Copyright (c) 2019-2023 Ryan Henry and others
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
/// see [LICENSE.md](@ref GPLv2) for details.
@ -44,7 +44,7 @@ struct offset_iterable
HEDLEY_ALWAYS_INLINE
constexpr offset_iterable(wrapped_iterator begin, wrapped_iterator end,
size_type offset)
: rotated_iterable_{begin, end, std::distance(begin,
: rotation_{begin, end, std::distance(begin,
std::upper_bound(begin, end, offset, std::less_equal<value_type>{}))},
offset_{offset}
{
@ -54,13 +54,13 @@ struct offset_iterable
HEDLEY_ALWAYS_INLINE
constexpr value_type operator[](size_type index) const
{
return rotated_iterable_[index] - offset_;
return rotation_[index] - offset_;
}
HEDLEY_ALWAYS_INLINE
constexpr auto rotation() const
{
return rotated_iterable_;
return rotation_;
}
HEDLEY_ALWAYS_INLINE
@ -71,11 +71,11 @@ struct offset_iterable
iterator begin()
{
return iterator{std::begin(rotated_iterable_), offset_};
return iterator{std::begin(rotation_), offset_};
}
const_iterator begin() const
{
return const_iterator{std::begin(rotated_iterable_), offset_};
return const_iterator{std::begin(rotation_), offset_};
}
constexpr const_iterator cbegin() const
{
@ -84,12 +84,12 @@ struct offset_iterable
iterator end()
{
return iterator{std::end(rotated_iterable_), offset_};
return iterator{std::end(rotation_), offset_};
}
const_iterator end() const
{
return const_iterator{std::end(rotated_iterable_), offset_};
return const_iterator{std::end(rotation_), offset_};
}
constexpr const_iterator cend() const
@ -98,7 +98,7 @@ struct offset_iterable
}
private:
dpf::rotation_iterable<wrapped_iterator> rotated_iterable_;
dpf::rotation_iterable<wrapped_iterator> rotation_;
size_type offset_;
};