pub struct ReductionContext<'ring, 'data, R>where
R: 'ring + ?Sized + PolyGCDLocallyDomain,
'ring: 'data,{ /* private fields */ }Expand description
The sequence of maps R -> R/m1^e x ... x R/mr^e -> R/m1 x ... x R/mr, where
m1, ..., mr are the maximal ideals containing I, as specified by PolyGCDLocallyDomain.
This sequence of maps is very relevant when using the compute-mod-p-and-lift approach
for polynomial operations over infinite rings (e.g. QQ). This is also the primary use case
for ReductionContext.
§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.
Implementations§
Source§impl<'ring, 'data, R> ReductionContext<'ring, 'data, R>where
R: 'ring + ?Sized + PolyGCDLocallyDomain,
'ring: 'data,
impl<'ring, 'data, R> ReductionContext<'ring, 'data, R>where
R: 'ring + ?Sized + PolyGCDLocallyDomain,
'ring: 'data,
Sourcepub fn new(
ring: &'data R,
ideal: &'data R::SuitableIdeal<'ring>,
e: usize,
) -> Self
pub fn new( ring: &'data R, ideal: &'data R::SuitableIdeal<'ring>, e: usize, ) -> Self
§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.
Sourcepub fn ideal(&self) -> &'data R::SuitableIdeal<'ring>
pub fn ideal(&self) -> &'data R::SuitableIdeal<'ring>
§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.
Sourcepub fn main_ring_to_field_reduction<'local>(
&'local self,
max_ideal_idx: usize,
) -> PolyGCDLocallyReductionMap<'ring, 'data, 'local, R>
pub fn main_ring_to_field_reduction<'local>( &'local self, max_ideal_idx: usize, ) -> PolyGCDLocallyReductionMap<'ring, 'data, 'local, R>
§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.
Sourcepub fn main_ring_to_intermediate_ring_reduction<'local>(
&'local self,
max_ideal_idx: usize,
) -> PolyGCDLocallyReductionMap<'ring, 'data, 'local, R>
pub fn main_ring_to_intermediate_ring_reduction<'local>( &'local self, max_ideal_idx: usize, ) -> PolyGCDLocallyReductionMap<'ring, 'data, 'local, R>
§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.
Sourcepub fn intermediate_ring_to_field_reduction<'local>(
&'local self,
max_ideal_idx: usize,
) -> PolyGCDLocallyIntermediateReductionMap<'ring, 'data, 'local, R>
pub fn intermediate_ring_to_field_reduction<'local>( &'local self, max_ideal_idx: usize, ) -> PolyGCDLocallyIntermediateReductionMap<'ring, 'data, 'local, R>
§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.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
§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.
Sourcepub fn reconstruct_ring_el<'local, V>(&self, els: V) -> R::Element
pub fn reconstruct_ring_el<'local, V>(&self, els: V) -> R::Element
§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.
Auto Trait Implementations§
impl<'ring, 'data, R> Freeze for ReductionContext<'ring, 'data, R>where
R: ?Sized,
impl<'ring, 'data, R> RefUnwindSafe for ReductionContext<'ring, 'data, R>where
<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>: RefUnwindSafe,
R: RefUnwindSafe + ?Sized,
<R as PolyGCDLocallyDomain>::LocalRing<'ring>: RefUnwindSafe,
impl<'ring, 'data, R> Send for ReductionContext<'ring, 'data, R>where
<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>: Sync,
R: Sync + ?Sized,
<R as PolyGCDLocallyDomain>::LocalRing<'ring>: Send,
impl<'ring, 'data, R> Sync for ReductionContext<'ring, 'data, R>where
<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>: Sync,
R: Sync + ?Sized,
<R as PolyGCDLocallyDomain>::LocalRing<'ring>: Sync,
impl<'ring, 'data, R> Unpin for ReductionContext<'ring, 'data, R>
impl<'ring, 'data, R> UnwindSafe for ReductionContext<'ring, 'data, R>where
<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>: RefUnwindSafe,
R: RefUnwindSafe + ?Sized,
<R as PolyGCDLocallyDomain>::LocalRing<'ring>: 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> 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 more