Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::algebra::semiring_ops< S > Struct Template Referenceexport

Canonical semiring operations of a carrier, so combinators can default their Add / Mult without a call site spelling them. The default (this primary) is the ordinary ring (+, ×), which is correct for any carrier whose native operators are its semiring ops; carriers whose ops differ specialize (the burden of proof sits at the implementation site): Tropical → (⊕ = TropicalPlus, ⊗ = +), bool → (∨, ∧) — bool must NOT take the default (bool

  • bool promotes to int). This single defaulted seam replaces the old detection(empty-primary)/resolution(semiring_ops_of) split.
More...

Public Types

using add = std::plus<S>
using mult = std::multiplies<S>

Detailed Description

template<typename S>
struct dedekind::algebra::semiring_ops< S >

Canonical semiring operations of a carrier, so combinators can default their Add / Mult without a call site spelling them. The default (this primary) is the ordinary ring (+, ×), which is correct for any carrier whose native operators are its semiring ops; carriers whose ops differ specialize (the burden of proof sits at the implementation site): Tropical → (⊕ = TropicalPlus, ⊗ = +), bool → (∨, ∧) — bool must NOT take the default (bool

  • bool promotes to int). This single defaulted seam replaces the old detection(empty-primary)/resolution(semiring_ops_of) split.
Template Parameters
Sthe carrier.

The documentation for this struct was generated from the following file: