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
|
|
@ -52,7 +52,7 @@ enum bit : bool
|
|||
/// equal to `dpf::bit::one` if the *least-significant bit* of
|
||||
/// `value` is `1` and `dpf::bit::zero` otherwise.
|
||||
/// @param value the `int` to convert
|
||||
/// @returns `static_cast<dpf::bit>(value & 1)`
|
||||
/// @return `static_cast<dpf::bit>(value & 1)`
|
||||
HEDLEY_CONST
|
||||
HEDLEY_NO_THROW
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
|
|
@ -64,6 +64,8 @@ static constexpr dpf::bit to_bit(int value) noexcept
|
|||
/// @brief converts the least-significant bit of an integer literal to a `dpf::bit`
|
||||
/// @details This overload exists so `operator""_bit` does not select the
|
||||
/// character converter, which is an exact match for `unsigned long long`.
|
||||
/// @param value the value to convert or store
|
||||
/// @return the returned `dpf::bit`
|
||||
HEDLEY_CONST
|
||||
HEDLEY_NO_THROW
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
|
|
@ -77,7 +79,7 @@ static constexpr dpf::bit to_bit(unsigned long long value) noexcept
|
|||
/// equal to `dpf::bit::one` if `value==true` and `dpf::bit::zero`
|
||||
/// otherwise.
|
||||
/// @param value the `bool` to convert
|
||||
/// @returns `static_cast<dpf::bit>(value)`
|
||||
/// @return `static_cast<dpf::bit>(value)`
|
||||
HEDLEY_CONST
|
||||
HEDLEY_NO_THROW
|
||||
HEDLEY_ALWAYS_INLINE
|
||||
|
|
@ -90,10 +92,12 @@ static constexpr dpf::bit to_bit(bool value) noexcept
|
|||
/// @details Convert a character to a `dpf::bit`. The resulting `dpf::bit` is
|
||||
/// equal to `dpf::bit::one` if `value==one` and `dpf::bit::zero`
|
||||
/// otherwise.
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Traits character traits
|
||||
/// @param value the character to convert
|
||||
/// @param zero character used to represent `0` (default: ``CharT('0')``)
|
||||
/// @param one character used to represent `1` (default: ``CharT('1')``)
|
||||
/// @returns `static_cast<dpf::bit>(0)` if `value==0` or
|
||||
/// @return `static_cast<dpf::bit>(0)` if `value==0` or
|
||||
/// `static_cast<dpf::bit>(1)` if `value==1`
|
||||
/// @throws std::domain_error if `value != zero && value != one`
|
||||
template <typename CharT,
|
||||
|
|
@ -117,6 +121,9 @@ static constexpr dpf::bit to_bit(
|
|||
/// @details Converts the contents of a `dpf::bit` to a `std::string` for
|
||||
/// human-friendly printing. Uses `zero` to represent the value
|
||||
/// `0` and `one` to the value `1`.
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Traits character traits
|
||||
/// @tparam Allocator allocator type
|
||||
/// @param value the `dpf::bit` to convert
|
||||
/// @param zero character to use to represent `false`/`0` (default: ``CharT('0')``)
|
||||
/// @param one character to use to represent `true`/`1` (default: ``CharT('1')``)
|
||||
|
|
@ -144,6 +151,8 @@ static std::basic_string<CharT, Traits, Allocator> to_string(
|
|||
/// characters to use for zero and one are obtained from the
|
||||
/// currently-imbued locale by calling `os.widen()` with `0` and `1`
|
||||
/// as the arguments.
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Traits character traits
|
||||
/// @param os a character output stream
|
||||
/// @param value the `dpf::bit` to insert into the output stream
|
||||
/// @return `os`
|
||||
|
|
@ -162,6 +171,8 @@ operator<<(std::basic_ostream<CharT, Traits> & os, const dpf::bit & value)
|
|||
/// stored in `value`. The characters to use for zero and one are
|
||||
/// obtained from the currently-imbued locale by calling `is.widen()`
|
||||
/// with `0` and `1` as the arguments.
|
||||
/// @tparam CharT character type
|
||||
/// @tparam Traits character traits
|
||||
/// @param is a character input stream
|
||||
/// @param value the `dpf::bit` to extract from the input stream
|
||||
/// @return `is`
|
||||
|
|
@ -190,6 +201,9 @@ inline constexpr dpf::bit operator+(dpf::bit lhs, dpf::bit rhs) noexcept
|
|||
}
|
||||
|
||||
/// @brief GF(2) subtraction. Identical to `operator+`.
|
||||
/// @param lhs the left-hand operand
|
||||
/// @param rhs the right-hand operand
|
||||
/// @return GF(2) subtraction
|
||||
HEDLEY_NO_THROW
|
||||
inline constexpr dpf::bit operator-(dpf::bit lhs, dpf::bit rhs) noexcept
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue