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:
parent
0d8a5a8131
commit
0dff6df8ed
250 changed files with 12199 additions and 1981 deletions
|
|
@ -214,6 +214,7 @@ class basic_fixed_length_string : public dpf::modint<static_cast<std::size_t>(st
|
|||
/// @}
|
||||
|
||||
/// @brief assign the `basic_fixed_length_string`
|
||||
/// @return `*this`
|
||||
/// @{
|
||||
|
||||
/// @brief value assignment
|
||||
|
|
@ -283,8 +284,10 @@ class basic_fixed_length_string : public dpf::modint<static_cast<std::size_t>(st
|
|||
|
||||
/// @brief converts a string of length at-most `max_length` over
|
||||
/// `alphabet` into an integer
|
||||
/// @throws `std::length_error` if `str` exceeds `max_length`
|
||||
/// @throws `std::domain_error` if `str` contains a char not in `alphabet`
|
||||
/// @param str the source string
|
||||
/// @return the returned `integral_type`
|
||||
/// @throws std::length_error if `str` exceeds `max_length`
|
||||
/// @throws std::domain_error if `str` contains a char not in `alphabet`
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
static constexpr integral_type encode_(string_view str)
|
||||
{
|
||||
|
|
@ -309,6 +312,8 @@ class basic_fixed_length_string : public dpf::modint<static_cast<std::size_t>(st
|
|||
|
||||
/// @brief Index of `c` in `alphabet`, or `npos` when `c` is absent.
|
||||
/// Byte alphabets use a 256-entry table; wider character types scan.
|
||||
/// @param c the `c`
|
||||
/// @return Index of `c` in `alphabet`, or `npos` when `c` is absent
|
||||
static constexpr std::size_t digit_of_(CharT c)
|
||||
{
|
||||
constexpr auto missing = string_view::npos;
|
||||
|
|
@ -340,6 +345,9 @@ class basic_fixed_length_string : public dpf::modint<static_cast<std::size_t>(st
|
|||
/// @{
|
||||
|
||||
/// @brief Writes the decoded string, not the packed integer.
|
||||
/// @param os the character output stream
|
||||
/// @param k the `k`
|
||||
/// @return the stream
|
||||
friend std::basic_ostream<CharT, Traits> &
|
||||
operator<<(std::basic_ostream<CharT, Traits> & os,
|
||||
const basic_fixed_length_string & k)
|
||||
|
|
@ -348,6 +356,9 @@ class basic_fixed_length_string : public dpf::modint<static_cast<std::size_t>(st
|
|||
}
|
||||
|
||||
/// @brief Reads a whitespace-delimited token and encodes it.
|
||||
/// @param is the character input stream
|
||||
/// @param k the `k`
|
||||
/// @return the stream
|
||||
friend std::basic_istream<CharT, Traits> &
|
||||
operator>>(std::basic_istream<CharT, Traits> & is,
|
||||
basic_fixed_length_string & k)
|
||||
|
|
@ -386,6 +397,13 @@ using keyword = basic_fixed_length_string<MaxLen, char, Alphabet>;
|
|||
/// @details Uses a `static_cast` to convert `str` to recreate the string
|
||||
/// representation of a `basic_fixed_length_string`
|
||||
/// @complexity `O(MaxLen)` where `MaxLen` is the maximum string length
|
||||
/// @tparam MaxLen maximum string length
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Alphabet alphabet the string is drawn from
|
||||
/// @tparam Traits character traits
|
||||
/// @tparam Allocator allocator type
|
||||
/// @param str the source string
|
||||
/// @return the returned `std::basic_string<CharT, Traits, Allocator>`
|
||||
template <std::size_t MaxLen,
|
||||
typename CharT,
|
||||
const CharT * Alphabet,
|
||||
|
|
@ -402,6 +420,11 @@ namespace utils
|
|||
{
|
||||
|
||||
/// @brief specializes `dpf::bitlength_of` for `dpf::basic_fixed_length_string`
|
||||
/// @tparam MaxLen maximum string length
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Alpha alphabet the string is drawn from
|
||||
/// @tparam Traits character traits
|
||||
/// @tparam Alloc allocator type
|
||||
template <std::size_t MaxLen,
|
||||
typename CharT,
|
||||
const CharT * Alpha,
|
||||
|
|
@ -413,6 +436,11 @@ struct bitlength_of<
|
|||
dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc>::bits> { };
|
||||
|
||||
/// @brief specializes `dpf::msb_of` for `dpf::basic_fixed_length_string`
|
||||
/// @tparam MaxLen maximum string length
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Alpha alphabet the string is drawn from
|
||||
/// @tparam Traits character traits
|
||||
/// @tparam Alloc allocator type
|
||||
template <std::size_t MaxLen,
|
||||
typename CharT,
|
||||
const CharT * Alpha,
|
||||
|
|
@ -427,6 +455,11 @@ struct msb_of<dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc
|
|||
|
||||
/// @brief specializes `dpf::countl_zero_symmetric_difference` for
|
||||
/// `dpf::basic_fixed_length_string`
|
||||
/// @tparam MaxLen maximum string length
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Alpha alphabet the string is drawn from
|
||||
/// @tparam Traits character traits
|
||||
/// @tparam Alloc allocator type
|
||||
template <std::size_t MaxLen,
|
||||
typename CharT,
|
||||
const CharT * Alpha,
|
||||
|
|
@ -472,6 +505,11 @@ namespace std
|
|||
/// @{
|
||||
|
||||
/// @details specializes `std::numeric_limits` for `dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc>`
|
||||
/// @tparam MaxLen maximum string length
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Alpha alphabet the string is drawn from
|
||||
/// @tparam Traits character traits
|
||||
/// @tparam Alloc allocator type
|
||||
template <std::size_t MaxLen,
|
||||
typename CharT,
|
||||
const CharT * Alpha,
|
||||
|
|
@ -527,6 +565,11 @@ class numeric_limits<dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits
|
|||
};
|
||||
|
||||
/// @details specializes `std::numeric_limits` for `dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc> const`
|
||||
/// @tparam MaxLen maximum string length
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Alpha alphabet the string is drawn from
|
||||
/// @tparam Traits character traits
|
||||
/// @tparam Alloc allocator type
|
||||
template <std::size_t MaxLen,
|
||||
typename CharT,
|
||||
const CharT * Alpha,
|
||||
|
|
@ -536,7 +579,12 @@ class numeric_limits<dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits
|
|||
: public numeric_limits<dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc>> {};
|
||||
|
||||
/// @details specializes `std::numeric_limits` for
|
||||
/// `dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc> volatile`
|
||||
/// @brief `dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc> volatile`
|
||||
/// @tparam MaxLen maximum string length
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Alpha alphabet the string is drawn from
|
||||
/// @tparam Traits character traits
|
||||
/// @tparam Alloc allocator type
|
||||
template <std::size_t MaxLen,
|
||||
typename CharT,
|
||||
const CharT * Alpha,
|
||||
|
|
@ -546,7 +594,12 @@ class numeric_limits<dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits
|
|||
: public numeric_limits<dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc>> {};
|
||||
|
||||
/// @details specializes `std::numeric_limits` for
|
||||
/// `dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc> const volatile`
|
||||
/// @brief `dpf::basic_fixed_length_string<MaxLen, CharT, Alpha, Traits, Alloc> const volatile`
|
||||
/// @tparam MaxLen maximum string length
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Alpha alphabet the string is drawn from
|
||||
/// @tparam Traits character traits
|
||||
/// @tparam Alloc allocator type
|
||||
template <std::size_t MaxLen,
|
||||
typename CharT,
|
||||
const CharT * Alpha,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue