Aerobus v1.2
|
#include <aerobus.h>
Classes | |
struct | horner_reduction_t |
Used to evaluate polynomials over a value in Ring. More... | |
struct | val |
values (seen as types) in polynomial ring More... | |
struct | val< coeffN > |
specialization for constants More... | |
Public Types | |
using | zero = val< typename Ring::zero > |
constant zero | |
using | one = val< typename Ring::one > |
constant one | |
using | X = val< typename Ring::one, typename Ring::zero > |
generator | |
template<typename P > | |
using | simplify_t = typename simplify< P >::type |
simplifies a polynomial (recursively deletes highest degree if zero, do nothing otherwise) | |
template<typename v1 , typename v2 > | |
using | add_t = typename add< v1, v2 >::type |
adds two polynomials | |
template<typename v1 , typename v2 > | |
using | sub_t = typename sub< v1, v2 >::type |
substraction of two polynomials | |
template<typename v1 , typename v2 > | |
using | mul_t = typename mul< v1, v2 >::type |
multiplication of two polynomials | |
template<typename v1 , typename v2 > | |
using | eq_t = typename eq_helper< v1, v2 >::type |
equality operator | |
template<typename v1 , typename v2 > | |
using | lt_t = typename lt_helper< v1, v2 >::type |
strict less operator | |
template<typename v1 , typename v2 > | |
using | gt_t = typename gt_helper< v1, v2 >::type |
strict greater operator | |
template<typename v1 , typename v2 > | |
using | div_t = typename div< v1, v2 >::q_type |
division operator | |
template<typename v1 , typename v2 > | |
using | mod_t = typename div_helper< v1, v2, zero, v1 >::mod_type |
modulo operator | |
template<typename coeff , size_t deg> | |
using | monomial_t = typename monomial< coeff, deg >::type |
monomial : coeff X^deg | |
template<typename v > | |
using | derive_t = typename derive_helper< v >::type |
derivation operator | |
template<typename v > | |
using | pos_t = typename Ring::template pos_t< typename v::aN > |
checks for positivity (an > 0) | |
template<typename v1 , typename v2 > | |
using | gcd_t = std::conditional_t< Ring::is_euclidean_domain, typename make_unit< gcd_t< polynomial< Ring >, v1, v2 > >::type, void > |
greatest common divisor of two polynomials | |
template<auto x> | |
using | inject_constant_t = val< typename Ring::template inject_constant_t< x > > |
makes the constant (native type) polynomial a_0 | |
template<typename v > | |
using | inject_ring_t = val< v > |
makes the constant (ring type) polynomial a_0 | |
Static Public Attributes | |
static constexpr bool | is_field = false |
static constexpr bool | is_euclidean_domain = Ring::is_euclidean_domain |
template<typename v > | |
static constexpr bool | pos_v = pos_t<v>::value |
positivity operator | |
polynomial with coefficients in Ring Ring must be an integral domain
using aerobus::polynomial< Ring >::add_t = typename add<v1, v2>::type |
adds two polynomials
v1 | |
v2 |
using aerobus::polynomial< Ring >::derive_t = typename derive_helper<v>::type |
derivation operator
v |
using aerobus::polynomial< Ring >::div_t = typename div<v1, v2>::q_type |
division operator
v1 | |
v2 |
using aerobus::polynomial< Ring >::eq_t = typename eq_helper<v1, v2>::type |
equality operator
v1 | |
v2 |
using aerobus::polynomial< Ring >::gcd_t = std::conditional_t< Ring::is_euclidean_domain, typename make_unit<gcd_t<polynomial<Ring>, v1, v2> >::type, void> |
greatest common divisor of two polynomials
v1 | |
v2 |
using aerobus::polynomial< Ring >::gt_t = typename gt_helper<v1, v2>::type |
strict greater operator
v1 | |
v2 |
using aerobus::polynomial< Ring >::inject_constant_t = val<typename Ring::template inject_constant_t<x> > |
makes the constant (native type) polynomial a_0
x |
using aerobus::polynomial< Ring >::inject_ring_t = val<v> |
makes the constant (ring type) polynomial a_0
v |
using aerobus::polynomial< Ring >::lt_t = typename lt_helper<v1, v2>::type |
strict less operator
v1 | |
v2 |
using aerobus::polynomial< Ring >::mod_t = typename div_helper<v1, v2, zero, v1>::mod_type |
modulo operator
v1 | |
v2 |
using aerobus::polynomial< Ring >::monomial_t = typename monomial<coeff, deg>::type |
monomial : coeff X^deg
coeff | |
deg |
using aerobus::polynomial< Ring >::mul_t = typename mul<v1, v2>::type |
multiplication of two polynomials
v1 | |
v2 |
using aerobus::polynomial< Ring >::one = val<typename Ring::one> |
constant one
using aerobus::polynomial< Ring >::pos_t = typename Ring::template pos_t<typename v::aN> |
checks for positivity (an > 0)
v |
using aerobus::polynomial< Ring >::simplify_t = typename simplify<P>::type |
simplifies a polynomial (recursively deletes highest degree if zero, do nothing otherwise)
P |
using aerobus::polynomial< Ring >::sub_t = typename sub<v1, v2>::type |
substraction of two polynomials
v1 | |
v2 |
using aerobus::polynomial< Ring >::X = val<typename Ring::one, typename Ring::zero> |
generator
using aerobus::polynomial< Ring >::zero = val<typename Ring::zero> |
constant zero
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
positivity operator
v | a value in polynomial::val |