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

The polynomial reading of a term on the carrier C, an algebra for cata: a projection is its variable, a constant a coefficient, + - * the polynomial's where the carrier admits them, a division by a nonzero constant on a field the multiplication by its inverse. Any other node (//, %, a division by a term, an applied arrow, a conditional) has no free algebra catalogued here and is refused. Expanding into polynomials uses commutativity of * and its distributivity over +, so the carrier must be a certified commutative rig. More...

Public Types

using P = Polynomial<C, Monomial<N>>

Public Member Functions

template<dedekind::sets::IsRingIntegral auto I>
constexpr P operator() (dedekind::sets::Projection< I >) const
template<typename K>
constexpr P operator() (const dedekind::sets::Const< K > &c) const
template<typename Op, typename A, typename B>
constexpr P operator() (const dedekind::sets::BinOp< Op, A, B > &, const P &x, const P &y) const
template<typename A, typename K>
constexpr P operator() (const dedekind::sets::BinOp< std::divides<>, A, dedekind::sets::Const< K > > &t, const P &x, const P &) const
template<typename Node, typename... Legs>
constexpr P operator() (const Node &, const Legs &...) const
template<typename K>
P steer (const dedekind::sets::Term< K > &t) const
 A term built at run time: each node checked against the carrier's rules as it is read, the refusal not_admitted.

Detailed Description

template<typename C, std::size_t N = 4>
requires dedekind::category::IsRig<C, std::plus<C>, std::multiplies<C>> && dedekind::category::IsCommutative<C, std::multiplies<C>>
struct dedekind::algebra::Poly< C, N >

The polynomial reading of a term on the carrier C, an algebra for cata: a projection is its variable, a constant a coefficient, + - * the polynomial's where the carrier admits them, a division by a nonzero constant on a field the multiplication by its inverse. Any other node (//, %, a division by a term, an applied arrow, a conditional) has no free algebra catalogued here and is refused. Expanding into polynomials uses commutativity of * and its distributivity over +, so the carrier must be a certified commutative rig.

Template Parameters
Cthe carrier.
Nthe variables: the slots π, π_1, π_2, π_3.

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