Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::optimization::Halfspace2D< T, a, b, c > Struct Template Referenceexport

2D halfspace a·x + b·y ≤ c, entries as NTTPs. More...

Public Types

using scalar_type = T

Static Public Member Functions

template<T x, T y>
static constexpr bool contains ()
 a·x + b·y ≤ c evaluated at a specific (x, y).
static constexpr bool contains_value (T x, T y)
 Value-level membership check, for runtime / constexpr use.

Static Public Attributes

static constexpr T coeff_x = a
static constexpr T coeff_y = b
static constexpr T bound = c

Detailed Description

template<typename T, T a, T b, T c>
requires dedekind::algebra::HasRingOperators<T>
struct dedekind::optimization::Halfspace2D< T, a, b, c >

2D halfspace a·x + b·y ≤ c, entries as NTTPs.

Convention: constraints are in ≤-normal form. For ≥ constraints, negate coefficients and bound: x ≥ 0 becomes Halfspace2D<T, -1, 0, 0>.


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