Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::optimization::Polytope2D< T, cx, cy, Hs > Struct Template Referencefinalexport

Polytope context: the (cx, cy, Hs...) pack reified as a type. More...

Public Types

using scalar_type = T

Static Public Member Functions

static constexpr auto extract ()
 ε: extract the optimal locus as a Set whose predicate type pins the regime (singleton at NTTP coords, or empty). The reduction collapses to a typed constant at instantiation — the LP-optimum-as-typed-Set claim of §5.

Static Public Attributes

static constexpr T objective_x = cx
static constexpr T objective_y = cy

Detailed Description

template<typename T, T cx, T cy, typename... Hs>
requires (sizeof...(Hs) >= 2) && dedekind::algebra::HasRingOperators<T>
struct dedekind::optimization::Polytope2D< T, cx, cy, Hs >

Polytope context: the (cx, cy, Hs...) pack reified as a type.

lp__Comonadic_Extract_Witness

argmax(G, U) is structurally a comonadic counit (ε in the Kleisli notation): it takes the polytope-context G ⊆ F bundled with the objective U and extracts the optimal locus as a Set whose predicate type encodes the regime. The pack-as-context view matches the textbook co-Kleisli arrow shape F<T> → T already noted in the file header. The Polytope2D wrapper below makes the extract explicit at the type level so the witness can be pinned without changing the primary API surface.

Carries no runtime state; it exists only so the comonadic extract has a context-carrier to consume. Conceptually F<T> in the F<T> → T shape of the LP reduction. Exported alongside lp_extract so module consumers can name the parameter type.


The documentation for this struct was generated from the following file:
  • src/main/modules/dedekind/optimization/lp.cppm