pub struct DirectPowerRingBase<R: RingStore, const N: usize> { /* private fields */ }
unstable-enable
only.Expand description
The N
-fold direct product ring R x ... x R
.
Currently, this is a quite naive implementation, which just repeats operations along each component. In the future, this might become an entrypoint for vectorization or similar. Hence, it might remain unstable for a while.
§Availability
This API is marked as unstable and is only available when the unstable-enable
crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.
Trait Implementations§
Source§impl<S: RingStore, R: RingStore, const N: usize> CanHomFrom<DirectPowerRingBase<S, N>> for DirectPowerRingBase<R, N>
impl<S: RingStore, R: RingStore, const N: usize> CanHomFrom<DirectPowerRingBase<S, N>> for DirectPowerRingBase<R, N>
Source§type Homomorphism = <<R as RingStore>::Type as CanHomFrom<<S as RingStore>::Type>>::Homomorphism
type Homomorphism = <<R as RingStore>::Type as CanHomFrom<<S as RingStore>::Type>>::Homomorphism
Source§fn has_canonical_hom(
&self,
from: &DirectPowerRingBase<S, N>,
) -> Option<Self::Homomorphism>
fn has_canonical_hom( &self, from: &DirectPowerRingBase<S, N>, ) -> Option<Self::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: &DirectPowerRingBase<S, N>,
el: <DirectPowerRingBase<S, N> as RingBase>::Element,
hom: &Self::Homomorphism,
) -> Self::Element
fn map_in( &self, from: &DirectPowerRingBase<S, N>, el: <DirectPowerRingBase<S, N> as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element
Source§fn map_in_ref(
&self,
from: &DirectPowerRingBase<S, N>,
el: &<DirectPowerRingBase<S, N> as RingBase>::Element,
hom: &Self::Homomorphism,
) -> Self::Element
fn map_in_ref( &self, from: &DirectPowerRingBase<S, N>, el: &<DirectPowerRingBase<S, N> as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element
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, )
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, )
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
summand + lhs * rhs
, where rhs
is mapped into the ring via the homomorphism.Source§impl<S: RingStore, R: RingStore, const N: usize> CanIsoFromTo<DirectPowerRingBase<S, N>> for DirectPowerRingBase<R, N>
impl<S: RingStore, R: RingStore, const N: usize> CanIsoFromTo<DirectPowerRingBase<S, N>> for DirectPowerRingBase<R, N>
Source§type Isomorphism = <<R as RingStore>::Type as CanIsoFromTo<<S as RingStore>::Type>>::Isomorphism
type Isomorphism = <<R as RingStore>::Type as CanIsoFromTo<<S as RingStore>::Type>>::Isomorphism
Source§fn has_canonical_iso(
&self,
from: &DirectPowerRingBase<S, N>,
) -> Option<Self::Isomorphism>
fn has_canonical_iso( &self, from: &DirectPowerRingBase<S, N>, ) -> Option<Self::Isomorphism>
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§fn map_out(
&self,
from: &DirectPowerRingBase<S, N>,
el: Self::Element,
iso: &Self::Isomorphism,
) -> <DirectPowerRingBase<S, N> as RingBase>::Element
fn map_out( &self, from: &DirectPowerRingBase<S, N>, el: Self::Element, iso: &Self::Isomorphism, ) -> <DirectPowerRingBase<S, N> as RingBase>::Element
el
under the canonical homomorphism from -> self
.Source§impl<R, const N: usize> Clone for DirectPowerRingBase<R, N>
impl<R, const N: usize> Clone for DirectPowerRingBase<R, N>
Source§impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 1>
impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 1>
Source§fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + twiddle * y, x - twiddle * y)
. Read moreSource§fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + y, (x - y) * twiddle)
Read moreSource§fn prepare_for_fft(&self, value: &mut [ZnEl; 1])
fn prepare_for_fft(&self, value: &mut [ZnEl; 1])
CooleyTuckeyButterfly::butterfly_new()
that the inputs are in this form.Source§fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 1])
fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 1])
CooleyTuckeyButterfly::inv_butterfly_new()
that the inputs are in this form.Source§fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2])
. Read moreSource§fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle)
Read moreSource§impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 16>
impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 16>
Source§fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + twiddle * y, x - twiddle * y)
. Read moreSource§fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + y, (x - y) * twiddle)
Read moreSource§fn prepare_for_fft(&self, value: &mut [ZnEl; 16])
fn prepare_for_fft(&self, value: &mut [ZnEl; 16])
CooleyTuckeyButterfly::butterfly_new()
that the inputs are in this form.Source§fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 16])
fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 16])
CooleyTuckeyButterfly::inv_butterfly_new()
that the inputs are in this form.Source§fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2])
. Read moreSource§fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle)
Read moreSource§impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 2>
impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 2>
Source§fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + twiddle * y, x - twiddle * y)
. Read moreSource§fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + y, (x - y) * twiddle)
Read moreSource§fn prepare_for_fft(&self, value: &mut [ZnEl; 2])
fn prepare_for_fft(&self, value: &mut [ZnEl; 2])
CooleyTuckeyButterfly::butterfly_new()
that the inputs are in this form.Source§fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 2])
fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 2])
CooleyTuckeyButterfly::inv_butterfly_new()
that the inputs are in this form.Source§fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2])
. Read moreSource§fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle)
Read moreSource§impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 3>
impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 3>
Source§fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + twiddle * y, x - twiddle * y)
. Read moreSource§fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + y, (x - y) * twiddle)
Read moreSource§fn prepare_for_fft(&self, value: &mut [ZnEl; 3])
fn prepare_for_fft(&self, value: &mut [ZnEl; 3])
CooleyTuckeyButterfly::butterfly_new()
that the inputs are in this form.Source§fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 3])
fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 3])
CooleyTuckeyButterfly::inv_butterfly_new()
that the inputs are in this form.Source§fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2])
. Read moreSource§fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle)
Read moreSource§impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 4>
impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 4>
Source§fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + twiddle * y, x - twiddle * y)
. Read moreSource§fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + y, (x - y) * twiddle)
Read moreSource§fn prepare_for_fft(&self, value: &mut [ZnEl; 4])
fn prepare_for_fft(&self, value: &mut [ZnEl; 4])
CooleyTuckeyButterfly::butterfly_new()
that the inputs are in this form.Source§fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 4])
fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 4])
CooleyTuckeyButterfly::inv_butterfly_new()
that the inputs are in this form.Source§fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2])
. Read moreSource§fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle)
Read moreSource§impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 5>
impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 5>
Source§fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + twiddle * y, x - twiddle * y)
. Read moreSource§fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + y, (x - y) * twiddle)
Read moreSource§fn prepare_for_fft(&self, value: &mut [ZnEl; 5])
fn prepare_for_fft(&self, value: &mut [ZnEl; 5])
CooleyTuckeyButterfly::butterfly_new()
that the inputs are in this form.Source§fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 5])
fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 5])
CooleyTuckeyButterfly::inv_butterfly_new()
that the inputs are in this form.Source§fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2])
. Read moreSource§fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle)
Read moreSource§impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 6>
impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 6>
Source§fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + twiddle * y, x - twiddle * y)
. Read moreSource§fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + y, (x - y) * twiddle)
Read moreSource§fn prepare_for_fft(&self, value: &mut [ZnEl; 6])
fn prepare_for_fft(&self, value: &mut [ZnEl; 6])
CooleyTuckeyButterfly::butterfly_new()
that the inputs are in this form.Source§fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 6])
fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 6])
CooleyTuckeyButterfly::inv_butterfly_new()
that the inputs are in this form.Source§fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2])
. Read moreSource§fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle)
Read moreSource§impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 7>
impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 7>
Source§fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + twiddle * y, x - twiddle * y)
. Read moreSource§fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + y, (x - y) * twiddle)
Read moreSource§fn prepare_for_fft(&self, value: &mut [ZnEl; 7])
fn prepare_for_fft(&self, value: &mut [ZnEl; 7])
CooleyTuckeyButterfly::butterfly_new()
that the inputs are in this form.Source§fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 7])
fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 7])
CooleyTuckeyButterfly::inv_butterfly_new()
that the inputs are in this form.Source§fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2])
. Read moreSource§fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle)
Read moreSource§impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 8>
impl CooleyTuckeyButterfly<ZnFastmulBase> for DirectPowerRingBase<Zn, 8>
Source§fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + twiddle * y, x - twiddle * y)
. Read moreSource§fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>(
hom: H,
x: &mut Self::Element,
y: &mut Self::Element,
twiddle: &ZnFastmulEl,
)
fn inv_butterfly_new<H: Homomorphism<ZnFastmulBase, Self>>( hom: H, x: &mut Self::Element, y: &mut Self::Element, twiddle: &ZnFastmulEl, )
(x, y) := (x + y, (x - y) * twiddle)
Read moreSource§fn prepare_for_fft(&self, value: &mut [ZnEl; 8])
fn prepare_for_fft(&self, value: &mut [ZnEl; 8])
CooleyTuckeyButterfly::butterfly_new()
that the inputs are in this form.Source§fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 8])
fn prepare_for_inv_fft(&self, value: &mut [ZnEl; 8])
CooleyTuckeyButterfly::inv_butterfly_new()
that the inputs are in this form.Source§fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2])
. Read moreSource§fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>(
&self,
hom: H,
values: &mut V,
twiddle: &S::Element,
i1: usize,
i2: usize,
)
fn inv_butterfly<V: VectorViewMut<Self::Element>, H: Homomorphism<S, Self>>( &self, hom: H, values: &mut V, twiddle: &S::Element, i1: usize, i2: usize, )
(values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle)
Read moreSource§impl<R: RingStore, const N: usize> DivisibilityRing for DirectPowerRingBase<R, N>where
R::Type: DivisibilityRing,
impl<R: RingStore, const N: usize> DivisibilityRing for DirectPowerRingBase<R, N>where
R::Type: DivisibilityRing,
Source§type PreparedDivisorData = [<<R as RingStore>::Type as DivisibilityRing>::PreparedDivisorData; N]
type PreparedDivisorData = [<<R as RingStore>::Type as DivisibilityRing>::PreparedDivisorData; N]
Source§fn checked_left_div(
&self,
lhs: &Self::Element,
rhs: &Self::Element,
) -> Option<Self::Element>
fn checked_left_div( &self, lhs: &Self::Element, rhs: &Self::Element, ) -> Option<Self::Element>
x
such that rhs * x = lhs
, and
returns it if it exists. Read moreSource§fn prepare_divisor(&self, el: &Self::Element) -> Self::PreparedDivisorData
fn prepare_divisor(&self, el: &Self::Element) -> Self::PreparedDivisorData
Source§fn checked_left_div_prepared(
&self,
lhs: &Self::Element,
rhs: &Self::Element,
rhs_prep: &Self::PreparedDivisorData,
) -> Option<Self::Element>
fn checked_left_div_prepared( &self, lhs: &Self::Element, rhs: &Self::Element, rhs_prep: &Self::PreparedDivisorData, ) -> Option<Self::Element>
DivisibilityRing::checked_left_div()
but for a prepared divisor. Read moreSource§fn divides_left_prepared(
&self,
lhs: &Self::Element,
rhs: &Self::Element,
rhs_prep: &Self::PreparedDivisorData,
) -> bool
fn divides_left_prepared( &self, lhs: &Self::Element, rhs: &Self::Element, rhs_prep: &Self::PreparedDivisorData, ) -> bool
DivisibilityRing::divides_left()
but for a prepared divisor. Read moreSource§fn divides_left(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
fn divides_left(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
x
such that rhs * x = lhs
.
If you need such an element, consider using DivisibilityRing::checked_left_div()
. Read moreSource§fn divides(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
fn divides(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
DivisibilityRing::divides_left()
, but requires a commutative ring.Source§fn checked_div(
&self,
lhs: &Self::Element,
rhs: &Self::Element,
) -> Option<Self::Element>
fn checked_div( &self, lhs: &Self::Element, rhs: &Self::Element, ) -> Option<Self::Element>
DivisibilityRing::checked_left_div()
, but requires a commutative ring.Source§fn is_unit(&self, x: &Self::Element) -> bool
fn is_unit(&self, x: &Self::Element) -> bool
Source§fn balance_factor<'a, I>(&self, _elements: I) -> Option<Self::Element>
fn balance_factor<'a, I>(&self, _elements: I) -> Option<Self::Element>
Source§fn is_unit_prepared(&self, x: &PreparedDivisor<Self>) -> bool
fn is_unit_prepared(&self, x: &PreparedDivisor<Self>) -> bool
DivisibilityRing::is_unit()
but for a prepared divisor. Read moreSource§impl<R: RingStore, const N: usize> FiniteRing for DirectPowerRingBase<R, N>where
R::Type: FiniteRing,
impl<R: RingStore, const N: usize> FiniteRing for DirectPowerRingBase<R, N>where
R::Type: FiniteRing,
Source§type ElementsIter<'a> = MultiProduct<<<R as RingStore>::Type as FiniteRing>::ElementsIter<'a>, DirectPowerRingElCreator<'a, R, N>, CloneRingEl<&'a R>, [<<R as RingStore>::Type as RingBase>::Element; N]>
where
Self: 'a
type ElementsIter<'a> = MultiProduct<<<R as RingStore>::Type as FiniteRing>::ElementsIter<'a>, DirectPowerRingElCreator<'a, R, N>, CloneRingEl<&'a R>, [<<R as RingStore>::Type as RingBase>::Element; N]> where Self: 'a
FiniteRing::elements()
, which should
iterate over all elements of the ring.Source§fn elements<'a>(&'a self) -> Self::ElementsIter<'a>
fn elements<'a>(&'a self) -> Self::ElementsIter<'a>
Source§impl<R: RingStore, const N: usize> FiniteRingSpecializable for DirectPowerRingBase<R, N>where
R::Type: FiniteRingSpecializable,
impl<R: RingStore, const N: usize> FiniteRingSpecializable for DirectPowerRingBase<R, N>where
R::Type: FiniteRingSpecializable,
Source§fn specialize<O: FiniteRingOperation<Self>>(op: O) -> O::Output
fn specialize<O: FiniteRingOperation<Self>>(op: O) -> O::Output
unstable-enable
only.Source§fn is_finite_ring() -> bool
fn is_finite_ring() -> bool
unstable-enable
only.Source§impl<R: RingStore, const N: usize> HashableElRing for DirectPowerRingBase<R, N>where
R::Type: HashableElRing,
impl<R: RingStore, const N: usize> HashableElRing for DirectPowerRingBase<R, N>where
R::Type: HashableElRing,
Source§impl<R: RingStore, const N: usize> RingBase for DirectPowerRingBase<R, N>
impl<R: RingStore, const N: usize> RingBase for DirectPowerRingBase<R, N>
Source§type Element = [<<R as RingStore>::Type as RingBase>::Element; N]
type Element = [<<R as RingStore>::Type as RingBase>::Element; N]
fn clone_el(&self, val: &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 zero(&self) -> Self::Element
fn one(&self) -> Self::Element
fn neg_one(&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
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
Source§fn is_approximate(&self) -> bool
fn is_approximate(&self) -> bool
f32
or
f64
, to represent real or complex numbers. Read moreSource§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
value
to out
, taking into account the possible context
to place parenthesis as needed. Read morefn square(&self, value: &mut Self::Element)
fn sub_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)
fn mul_assign_int(&self, lhs: &mut Self::Element, rhs: i32)
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)
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)
lhs := rhs - lhs
.Source§fn sum<I>(&self, els: I) -> Self::Elementwhere
I: IntoIterator<Item = Self::Element>,
fn sum<I>(&self, els: I) -> Self::Elementwhere
I: IntoIterator<Item = Self::Element>,
Source§fn prod<I>(&self, els: I) -> Self::Elementwhere
I: IntoIterator<Item = Self::Element>,
fn prod<I>(&self, els: I) -> Self::Elementwhere
I: IntoIterator<Item = Self::Element>,
Source§fn characteristic<I: RingStore + Copy>(&self, ZZ: I) -> Option<El<I>>where
I::Type: IntegerRing,
fn characteristic<I: RingStore + Copy>(&self, ZZ: I) -> Option<El<I>>where
I::Type: IntegerRing,
ZZ
. Read moreSource§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
summand + lhs * rhs
.fn negate(&self, value: Self::Element) -> Self::Element
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
summand + lhs * rhs
.fn add_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
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(&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§impl<R: RingStore, const N: usize> RingExtension for DirectPowerRingBase<R, N>
impl<R: RingStore, const N: usize> RingExtension for DirectPowerRingBase<R, N>
Source§fn from(&self, x: El<Self::BaseRing>) -> Self::Element
fn from(&self, x: El<Self::BaseRing>) -> Self::Element
Source§fn from_ref(&self, x: &El<Self::BaseRing>) -> Self::Element
fn from_ref(&self, x: &El<Self::BaseRing>) -> Self::Element
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>)
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 mul_assign_base_through_hom<S: ?Sized + RingBase, H: Homomorphism<S, R::Type>>(
&self,
lhs: &mut Self::Element,
rhs: &S::Element,
hom: H,
)
fn mul_assign_base_through_hom<S: ?Sized + RingBase, H: Homomorphism<S, R::Type>>( &self, lhs: &mut Self::Element, rhs: &S::Element, hom: H, )
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 morefn fma_base( &self, lhs: &Self::Element, rhs: &El<Self::BaseRing>, summand: Self::Element, ) -> Self::Element
Source§impl<R: RingStore, const N: usize> SerializableElementRing for DirectPowerRingBase<R, N>where
R::Type: SerializableElementRing,
impl<R: RingStore, const N: usize> SerializableElementRing for DirectPowerRingBase<R, N>where
R::Type: SerializableElementRing,
Source§fn deserialize<'de, D>(
&self,
deserializer: D,
) -> Result<Self::Element, D::Error>where
D: Deserializer<'de>,
fn deserialize<'de, D>(
&self,
deserializer: D,
) -> Result<Self::Element, D::Error>where
D: Deserializer<'de>,
unstable-enable
only.impl<R, const N: usize> Copy for DirectPowerRingBase<R, N>
Auto Trait Implementations§
impl<R, const N: usize> Freeze for DirectPowerRingBase<R, N>where
R: Freeze,
impl<R, const N: usize> RefUnwindSafe for DirectPowerRingBase<R, N>where
R: RefUnwindSafe,
impl<R, const N: usize> Send for DirectPowerRingBase<R, N>where
R: Send,
impl<R, const N: usize> Sync for DirectPowerRingBase<R, N>where
R: Sync,
impl<R, const N: usize> Unpin for DirectPowerRingBase<R, N>where
R: Unpin,
impl<R, const N: usize> UnwindSafe for DirectPowerRingBase<R, N>where
R: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
unstable-enable
only.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
unstable-enable
only.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, )
(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>,
(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, )
(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>,
(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)
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)
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>,
unstable-enable
only.(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>,
unstable-enable
only.(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>
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>
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
unstable-enable
only.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
unstable-enable
only.StrassenAlgorithm
will use the Strassen algorithm. Read more