pub struct MultivariatePolyRingImplBase<R, A = Global>{ /* private fields */ }Expand description
Implementation of multivariate polynomial rings.
Implementations§
Source§impl<R, A> MultivariatePolyRingImplBase<R, A>
impl<R, A> MultivariatePolyRingImplBase<R, A>
Trait Implementations§
Source§impl<P, R, A> CanHomFrom<P> for MultivariatePolyRingImplBase<R, A>where
R: RingStore,
A: Clone + Allocator + Send,
P: MultivariatePolyRing,
R::Type: CanHomFrom<<P::BaseRing as RingStore>::Type>,
impl<P, R, A> CanHomFrom<P> for MultivariatePolyRingImplBase<R, A>where
R: RingStore,
A: Clone + Allocator + Send,
P: MultivariatePolyRing,
R::Type: CanHomFrom<<P::BaseRing as RingStore>::Type>,
Source§type Homomorphism = <<R as RingStore>::Type as CanHomFrom<<<P as RingExtension>::BaseRing as RingStore>::Type>>::Homomorphism
type Homomorphism = <<R as RingStore>::Type as CanHomFrom<<<P as RingExtension>::BaseRing as RingStore>::Type>>::Homomorphism
Data required to compute the action of the canonical homomorphism on ring elements.
Source§fn has_canonical_hom(&self, from: &P) -> Option<Self::Homomorphism>
fn has_canonical_hom(&self, from: &P) -> Option<Self::Homomorphism>
If there is a canonical homomorphism
from -> self, returns Some(data), where
data is additional data that can be used to compute the action of the homomorphism
on ring elements. Otherwise, None is returned.Source§fn map_in(
&self,
from: &P,
el: <P as RingBase>::Element,
hom: &Self::Homomorphism,
) -> Self::Element
fn map_in( &self, from: &P, el: <P as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element
Evaluates the homomorphism.
Source§fn map_in_ref(
&self,
from: &P,
el: &<P as RingBase>::Element,
hom: &Self::Homomorphism,
) -> Self::Element
fn map_in_ref( &self, from: &P, el: &<P as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element
Evaluates the homomorphism, taking the element by reference.
Source§fn mul_assign_map_in(
&self,
from: &S,
lhs: &mut Self::Element,
rhs: S::Element,
hom: &Self::Homomorphism,
)
fn mul_assign_map_in( &self, from: &S, lhs: &mut Self::Element, rhs: S::Element, hom: &Self::Homomorphism, )
Evaluates the homomorphism on
rhs, and multiplies the result to lhs.Source§fn mul_assign_map_in_ref(
&self,
from: &S,
lhs: &mut Self::Element,
rhs: &S::Element,
hom: &Self::Homomorphism,
)
fn mul_assign_map_in_ref( &self, from: &S, lhs: &mut Self::Element, rhs: &S::Element, hom: &Self::Homomorphism, )
Evaluates the homomorphism on
rhs, taking it by reference, and multiplies the result to lhs.Source§fn fma_map_in(
&self,
from: &S,
lhs: &Self::Element,
rhs: &S::Element,
summand: Self::Element,
hom: &Self::Homomorphism,
) -> Self::Element
fn fma_map_in( &self, from: &S, lhs: &Self::Element, rhs: &S::Element, summand: Self::Element, hom: &Self::Homomorphism, ) -> Self::Element
Fused-multiply-add. Computes
summand + lhs * rhs, where rhs is mapped into the ring via the homomorphism.Source§impl<P, R, A> CanIsoFromTo<P> for MultivariatePolyRingImplBase<R, A>where
R: RingStore,
A: Clone + Allocator + Send,
P: MultivariatePolyRing,
R::Type: CanIsoFromTo<<P::BaseRing as RingStore>::Type>,
impl<P, R, A> CanIsoFromTo<P> for MultivariatePolyRingImplBase<R, A>where
R: RingStore,
A: Clone + Allocator + Send,
P: MultivariatePolyRing,
R::Type: CanIsoFromTo<<P::BaseRing as RingStore>::Type>,
Source§type Isomorphism = <<R as RingStore>::Type as CanIsoFromTo<<<P as RingExtension>::BaseRing as RingStore>::Type>>::Isomorphism
type Isomorphism = <<R as RingStore>::Type as CanIsoFromTo<<<P as RingExtension>::BaseRing as RingStore>::Type>>::Isomorphism
Data required to compute a preimage under the canonical homomorphism.
Source§fn has_canonical_iso(&self, from: &P) -> Option<Self::Isomorphism>
fn has_canonical_iso(&self, from: &P) -> Option<Self::Isomorphism>
If there is a canonical homomorphism
from -> self, and this homomorphism
is an isomorphism, returns Some(data), where data is additional data that
can be used to compute preimages under the homomorphism. Otherwise, None is
returned.Source§impl<R, A> Debug for MultivariatePolyRingImplBase<R, A>
impl<R, A> Debug for MultivariatePolyRingImplBase<R, A>
Source§impl<R, A> MultivariatePolyRing for MultivariatePolyRingImplBase<R, A>
impl<R, A> MultivariatePolyRing for MultivariatePolyRingImplBase<R, A>
type Monomial = MonomialIdentifier
type TermIter<'a> = TermIterImpl<'a, R> where Self: 'a
Source§fn indeterminate_count(&self) -> usize
fn indeterminate_count(&self) -> usize
Returns the number of variables of this polynomial ring, i.e. the transcendence degree
of the base ring.
Source§fn create_monomial<I>(&self, exponents: I) -> Self::Monomial
fn create_monomial<I>(&self, exponents: I) -> Self::Monomial
Creates a monomial with the given exponents. Read more
fn clone_monomial(&self, mon: &Self::Monomial) -> Self::Monomial
fn add_assign_from_terms<I>(&self, lhs: &mut Self::Element, terms: I)
Source§fn mul_assign_monomial(&self, f: &mut Self::Element, rhs: Self::Monomial)
fn mul_assign_monomial(&self, f: &mut Self::Element, rhs: Self::Monomial)
Multiplies the given polynomial with the given monomial.
Source§fn coefficient_at<'a>(
&'a self,
f: &'a Self::Element,
m: &Self::Monomial,
) -> &'a El<Self::BaseRing>
fn coefficient_at<'a>( &'a self, f: &'a Self::Element, m: &Self::Monomial, ) -> &'a El<Self::BaseRing>
Returns the coefficient corresponding to the given monomial in the given polynomial.
If the polynomial does not contain a term with that monomial, zero is returned.
Source§fn expand_monomial_to(&self, m: &Self::Monomial, out: &mut [usize])
fn expand_monomial_to(&self, m: &Self::Monomial, out: &mut [usize])
Writes the powers of each variable in the given monomial into the given
output slice. Read more
Source§fn exponent_at(&self, m: &Self::Monomial, var_index: usize) -> usize
fn exponent_at(&self, m: &Self::Monomial, var_index: usize) -> usize
Returns the power of the
var_index-th variable in the given monomial.
In other words, this maps X1^i1 ... Xm^im to i(var_index).Source§fn terms<'a>(&'a self, f: &'a Self::Element) -> Self::TermIter<'a>
fn terms<'a>(&'a self, f: &'a Self::Element) -> Self::TermIter<'a>
Returns an iterator over all nonzero terms of the given polynomial.
Source§fn monomial_deg(&self, mon: &Self::Monomial) -> usize
fn monomial_deg(&self, mon: &Self::Monomial) -> usize
Returns the degree of a monomial, i.e. the sum of the exponents of all variables.
Source§fn LT<'a, O: MonomialOrder>(
&'a self,
f: &'a Self::Element,
order: O,
) -> Option<(&'a El<Self::BaseRing>, &'a Self::Monomial)>
fn LT<'a, O: MonomialOrder>( &'a self, f: &'a Self::Element, order: O, ) -> Option<(&'a El<Self::BaseRing>, &'a Self::Monomial)>
Returns the Leading Term of
f, i.e. the term whose monomial is largest w.r.t. the given order.Source§fn largest_term_lt<'a, O: MonomialOrder>(
&'a self,
f: &'a Self::Element,
order: O,
lt_than: &Self::Monomial,
) -> Option<(&'a El<Self::BaseRing>, &'a Self::Monomial)>
fn largest_term_lt<'a, O: MonomialOrder>( &'a self, f: &'a Self::Element, order: O, lt_than: &Self::Monomial, ) -> Option<(&'a El<Self::BaseRing>, &'a Self::Monomial)>
Returns the term of
f whose monomial is largest (w.r.t. the given order) among all monomials smaller than lt_than.Source§fn monomial_mul(
&self,
lhs: Self::Monomial,
rhs: &Self::Monomial,
) -> Self::Monomial
fn monomial_mul( &self, lhs: Self::Monomial, rhs: &Self::Monomial, ) -> Self::Monomial
Multiplies two monomials.
Source§fn monomial_lcm(
&self,
lhs: Self::Monomial,
rhs: &Self::Monomial,
) -> Self::Monomial
fn monomial_lcm( &self, lhs: Self::Monomial, rhs: &Self::Monomial, ) -> Self::Monomial
Returns the least common multiple of two monomials.
Source§fn monomial_div(
&self,
lhs: Self::Monomial,
rhs: &Self::Monomial,
) -> Result<Self::Monomial, Self::Monomial>
fn monomial_div( &self, lhs: Self::Monomial, rhs: &Self::Monomial, ) -> Result<Self::Monomial, Self::Monomial>
Computes the quotient of two monomials. Read more
Source§fn evaluate<S, V, H>(&self, f: &Self::Element, values: V, hom: H) -> S::Element
fn evaluate<S, V, H>(&self, f: &Self::Element, values: V, hom: H) -> S::Element
Evaluates the given polynomial at the given values. Read more
Source§fn indeterminate(&self, i: usize) -> Self::Monomial
fn indeterminate(&self, i: usize) -> Self::Monomial
Returns the monomial
Xi, where Xi is the i-th generator of this ring.Source§fn create_term(
&self,
coeff: El<Self::BaseRing>,
monomial: Self::Monomial,
) -> Self::Element
fn create_term( &self, coeff: El<Self::BaseRing>, monomial: Self::Monomial, ) -> Self::Element
Creates a new single-term polynomial.
Source§fn map_terms<P, H>(&self, from: &P, el: &P::Element, hom: H) -> Self::Elementwhere
P: ?Sized + MultivariatePolyRing,
H: Homomorphism<<P::BaseRing as RingStore>::Type, <Self::BaseRing as RingStore>::Type>,
fn map_terms<P, H>(&self, from: &P, el: &P::Element, hom: H) -> Self::Elementwhere
P: ?Sized + MultivariatePolyRing,
H: Homomorphism<<P::BaseRing as RingStore>::Type, <Self::BaseRing as RingStore>::Type>,
Applies the given homomorphism
R -> S to each coefficient of the given polynomial
in R[X1, ..., Xm] to produce a monomial in S[X1, ..., Xm].Source§impl<R, A> PartialEq for MultivariatePolyRingImplBase<R, A>
impl<R, A> PartialEq for MultivariatePolyRingImplBase<R, A>
Source§impl<R, A> RingBase for MultivariatePolyRingImplBase<R, A>
impl<R, A> RingBase for MultivariatePolyRingImplBase<R, A>
Source§type Element = MultivariatePolyRingEl<R, A>
type Element = MultivariatePolyRingEl<R, A>
Type of elements of the ring
fn clone_el(&self, val: &Self::Element) -> Self::Element
fn add_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
fn add_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)
fn add_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
fn sub_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)
fn negate_inplace(&self, lhs: &mut Self::Element)
fn mul_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
fn mul_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)
fn mul_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
fn zero(&self) -> Self::Element
fn from_int(&self, value: i32) -> Self::Element
fn eq_el(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
fn is_zero(&self, value: &Self::Element) -> bool
fn is_one(&self, value: &Self::Element) -> bool
fn is_neg_one(&self, value: &Self::Element) -> bool
Source§fn is_commutative(&self) -> bool
fn is_commutative(&self) -> bool
Returns whether the ring is commutative, i.e.
a * b = b * a for all elements a, b.
Note that addition is assumed to be always commutative.Source§fn is_noetherian(&self) -> bool
fn is_noetherian(&self) -> bool
Returns whether the ring is noetherian, i.e. every ideal is finitely generated. Read more
Source§fn dbg_within<'a>(
&self,
value: &Self::Element,
out: &mut Formatter<'a>,
env: EnvBindingStrength,
) -> Result
fn dbg_within<'a>( &self, value: &Self::Element, out: &mut Formatter<'a>, env: EnvBindingStrength, ) -> Result
Writes a human-readable representation of
value to out, taking into account the possible context
to place parenthesis as needed. Read moreSource§fn characteristic<I: IntegerRingStore + Copy>(&self, ZZ: I) -> Option<El<I>>where
I::Type: IntegerRing,
fn characteristic<I: IntegerRingStore + Copy>(&self, ZZ: I) -> Option<El<I>>where
I::Type: IntegerRing,
Returns the characteristic of this ring as an element of the given
implementation of
ZZ. Read moreSource§fn is_approximate(&self) -> bool
fn is_approximate(&self) -> bool
Returns whether this ring computes with approximations to elements.
This would usually be the case for rings that are based on
f32 or
f64, to represent real or complex numbers. Read morefn one(&self) -> Self::Element
fn neg_one(&self) -> Self::Element
Source§fn fma(
&self,
lhs: &Self::Element,
rhs: &Self::Element,
summand: Self::Element,
) -> Self::Element
fn fma( &self, lhs: &Self::Element, rhs: &Self::Element, summand: Self::Element, ) -> Self::Element
Fused-multiply-add. This computes
summand + lhs * rhs.fn square(&self, value: &mut Self::Element)
fn negate(&self, value: Self::Element) -> Self::Element
fn sub_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
fn mul_assign_int(&self, lhs: &mut Self::Element, rhs: i32)
fn mul_int(&self, lhs: Self::Element, rhs: i32) -> Self::Element
fn mul_int_ref(&self, lhs: &Self::Element, rhs: i32) -> Self::Element
Source§fn fma_int(
&self,
lhs: &Self::Element,
rhs: i32,
summand: Self::Element,
) -> Self::Element
fn fma_int( &self, lhs: &Self::Element, rhs: i32, summand: Self::Element, ) -> Self::Element
Fused-multiply-add with an integer. This computes
summand + lhs * rhs.Source§fn sub_self_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
fn sub_self_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
Computes
lhs := rhs - lhs.Source§fn sub_self_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)
fn sub_self_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)
Computes
lhs := rhs - lhs.fn add_ref_fst(&self, lhs: &Self::Element, rhs: Self::Element) -> Self::Element
fn add_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element
fn add(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element
fn sub_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
fn sub_ref_fst(&self, lhs: &Self::Element, rhs: Self::Element) -> Self::Element
fn sub_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element
fn sub(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element
fn mul_ref_fst(&self, lhs: &Self::Element, rhs: Self::Element) -> Self::Element
fn mul_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element
fn mul(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element
Source§fn pow_gen<R: RingStore>(
&self,
x: Self::Element,
power: &El<R>,
integers: R,
) -> Self::Elementwhere
R::Type: IntegerRing,
fn pow_gen<R: RingStore>(
&self,
x: Self::Element,
power: &El<R>,
integers: R,
) -> Self::Elementwhere
R::Type: IntegerRing,
Raises
x to the power of an arbitrary, nonnegative integer given by
a custom integer ring implementation. Read moreSource§impl<R, A> RingExtension for MultivariatePolyRingImplBase<R, A>
impl<R, A> RingExtension for MultivariatePolyRingImplBase<R, A>
Source§fn from(&self, x: El<Self::BaseRing>) -> Self::Element
fn from(&self, x: El<Self::BaseRing>) -> Self::Element
Maps an element of the base ring into this ring. Read more
Source§fn mul_assign_base(&self, lhs: &mut Self::Element, rhs: &El<Self::BaseRing>)
fn mul_assign_base(&self, lhs: &mut Self::Element, rhs: &El<Self::BaseRing>)
Computes
lhs := lhs * rhs, where rhs is mapped into this
ring via RingExtension::from_ref(). Note that this may be
faster than self.mul_assign(lhs, self.from_ref(rhs)).Source§fn from_ref(&self, x: &El<Self::BaseRing>) -> Self::Element
fn from_ref(&self, x: &El<Self::BaseRing>) -> Self::Element
Maps an element of the base ring (given as reference) into this ring.
fn fma_base( &self, lhs: &Self::Element, rhs: &El<Self::BaseRing>, summand: Self::Element, ) -> Self::Element
Source§fn mul_assign_base_through_hom<S: ?Sized + RingBase, H: Homomorphism<S, <Self::BaseRing as RingStore>::Type>>(
&self,
lhs: &mut Self::Element,
rhs: &S::Element,
hom: H,
)
fn mul_assign_base_through_hom<S: ?Sized + RingBase, H: Homomorphism<S, <Self::BaseRing as RingStore>::Type>>( &self, lhs: &mut Self::Element, rhs: &S::Element, hom: H, )
Computes
lhs := lhs * rhs, where rhs is mapped into this ring
via the given homomorphism, followed by the inclusion (as specified by
RingExtension::from_ref()). Read moreAuto Trait Implementations§
impl<R, A = Global> !Freeze for MultivariatePolyRingImplBase<R, A>
impl<R, A> RefUnwindSafe for MultivariatePolyRingImplBase<R, A>where
R: RefUnwindSafe,
<<R as RingStore>::Type as RingBase>::Element: RefUnwindSafe,
A: RefUnwindSafe,
impl<R, A> Send for MultivariatePolyRingImplBase<R, A>
impl<R, A> Sync for MultivariatePolyRingImplBase<R, A>
impl<R, A> Unpin for MultivariatePolyRingImplBase<R, A>
impl<R, A> UnwindSafe for MultivariatePolyRingImplBase<R, A>where
R: UnwindSafe,
<<R as RingStore>::Type as RingBase>::Element: UnwindSafe + RefUnwindSafe,
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<R> ComputeInnerProduct for R
impl<R> ComputeInnerProduct for R
Source§default fn inner_product_ref_fst<'a, I>(
&self,
els: I,
) -> <R as RingBase>::Element
default fn inner_product_ref_fst<'a, I>( &self, els: I, ) -> <R as RingBase>::Element
Available on crate feature
unstable-enable only.Computes the inner product
sum_i lhs[i] * rhs[i].Source§default fn inner_product_ref<'a, I>(&self, els: I) -> <R as RingBase>::Element
default fn inner_product_ref<'a, I>(&self, els: I) -> <R as RingBase>::Element
Available on crate feature
unstable-enable only.Computes the inner product
sum_i lhs[i] * rhs[i].Source§impl<R, S> CooleyTuckeyButterfly<S> for R
impl<R, S> CooleyTuckeyButterfly<S> for R
Source§default fn butterfly<V, H>(
&self,
hom: H,
values: &mut V,
twiddle: &<S as RingBase>::Element,
i1: usize,
i2: usize,
)
default fn butterfly<V, H>( &self, hom: H, values: &mut V, twiddle: &<S as RingBase>::Element, i1: usize, i2: usize, )
👎Deprecated
Should compute
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2]). Read moreSource§default fn butterfly_new<H>(
hom: H,
x: &mut <R as RingBase>::Element,
y: &mut <R as RingBase>::Element,
twiddle: &<S as RingBase>::Element,
)where
H: Homomorphism<S, R>,
default fn butterfly_new<H>(
hom: H,
x: &mut <R as RingBase>::Element,
y: &mut <R as RingBase>::Element,
twiddle: &<S as RingBase>::Element,
)where
H: Homomorphism<S, R>,
Should compute
(x, y) := (x + twiddle * y, x - twiddle * y). Read moreSource§default fn inv_butterfly<V, H>(
&self,
hom: H,
values: &mut V,
twiddle: &<S as RingBase>::Element,
i1: usize,
i2: usize,
)
default fn inv_butterfly<V, H>( &self, hom: H, values: &mut V, twiddle: &<S as RingBase>::Element, i1: usize, i2: usize, )
👎Deprecated
Should compute
(values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle) Read moreSource§default fn inv_butterfly_new<H>(
hom: H,
x: &mut <R as RingBase>::Element,
y: &mut <R as RingBase>::Element,
twiddle: &<S as RingBase>::Element,
)where
H: Homomorphism<S, R>,
default fn inv_butterfly_new<H>(
hom: H,
x: &mut <R as RingBase>::Element,
y: &mut <R as RingBase>::Element,
twiddle: &<S as RingBase>::Element,
)where
H: Homomorphism<S, R>,
Should compute
(x, y) := (x + y, (x - y) * twiddle) Read moreSource§default fn prepare_for_fft(&self, _value: &mut <R as RingBase>::Element)
default fn prepare_for_fft(&self, _value: &mut <R as RingBase>::Element)
Possibly pre-processes elements before the FFT starts. Here you can
bring ring element into a certain form, and assume during
CooleyTuckeyButterfly::butterfly_new()
that the inputs are in this form.Source§default fn prepare_for_inv_fft(&self, _value: &mut <R as RingBase>::Element)
default fn prepare_for_inv_fft(&self, _value: &mut <R as RingBase>::Element)
Possibly pre-processes elements before the inverse FFT starts. Here you can
bring ring element into a certain form, and assume during
CooleyTuckeyButterfly::inv_butterfly_new()
that the inputs are in this form.Source§impl<R, S> CooleyTukeyRadix3Butterfly<S> for R
impl<R, S> CooleyTukeyRadix3Butterfly<S> for R
Source§default fn prepare_for_fft(&self, _value: &mut <R as RingBase>::Element)
Available on crate feature unstable-enable only.
default fn prepare_for_fft(&self, _value: &mut <R as RingBase>::Element)
unstable-enable only.Possibly pre-processes elements before the FFT starts. Here you can bring ring element
into a certain form, and assume during CooleyTukeyRadix3Butterfly::butterfly()
that the inputs are in this form.
Source§default fn prepare_for_inv_fft(&self, _value: &mut <R as RingBase>::Element)
Available on crate feature unstable-enable only.
default fn prepare_for_inv_fft(&self, _value: &mut <R as RingBase>::Element)
unstable-enable only.Possibly pre-processes elements before the inverse FFT starts. Here you can bring ring element
into a certain form, and assume during CooleyTukeyRadix3Butterfly::inv_butterfly()
that the inputs are in this form.
Source§default fn butterfly<H>(
hom: H,
a: &mut <R as RingBase>::Element,
b: &mut <R as RingBase>::Element,
c: &mut <R as RingBase>::Element,
z: &<S as RingBase>::Element,
t: &<S as RingBase>::Element,
t_sqr_z_sqr: &<S as RingBase>::Element,
)where
H: Homomorphism<S, R>,
default fn butterfly<H>(
hom: H,
a: &mut <R as RingBase>::Element,
b: &mut <R as RingBase>::Element,
c: &mut <R as RingBase>::Element,
z: &<S as RingBase>::Element,
t: &<S as RingBase>::Element,
t_sqr_z_sqr: &<S as RingBase>::Element,
)where
H: Homomorphism<S, R>,
Available on crate feature
unstable-enable only.Should compute
(a, b, c) := (a + t b + t^2 c, a + t z b + t^2 z^2 c, a + t z^2 b + t^2 z c). Read moreSource§default fn inv_butterfly<H>(
hom: H,
a: &mut <R as RingBase>::Element,
b: &mut <R as RingBase>::Element,
c: &mut <R as RingBase>::Element,
z: &<S as RingBase>::Element,
t: &<S as RingBase>::Element,
t_sqr: &<S as RingBase>::Element,
)where
H: Homomorphism<S, R>,
default fn inv_butterfly<H>(
hom: H,
a: &mut <R as RingBase>::Element,
b: &mut <R as RingBase>::Element,
c: &mut <R as RingBase>::Element,
z: &<S as RingBase>::Element,
t: &<S as RingBase>::Element,
t_sqr: &<S as RingBase>::Element,
)where
H: Homomorphism<S, R>,
Available on crate feature
unstable-enable only.Should compute
(a, b, c) := (a + b + c, t (a + z^2 b + z c), t^2 (a + z b + z^2 c)). Read moreSource§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<R> KaratsubaHint for R
impl<R> KaratsubaHint for R
Source§default fn karatsuba_threshold(&self) -> usize
default fn karatsuba_threshold(&self) -> usize
Available on crate feature
unstable-enable only.Define a threshold from which on
KaratsubaAlgorithm will use the Karatsuba algorithm. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R> StrassenHint for R
impl<R> StrassenHint for R
Source§default fn strassen_threshold(&self) -> usize
default fn strassen_threshold(&self) -> usize
Available on crate feature
unstable-enable only.Define a threshold from which on
StrassenAlgorithm will use the Strassen algorithm. Read more