pub struct AsLocalPIRBase<R: DivisibilityRingStore>where
R::Type: DivisibilityRing,{ /* private fields */ }Expand description
A wrapper around a ring that marks this ring to be a local principal ideal ring.
The design is analogous to crate::rings::field::AsFieldBase.
§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<R: DivisibilityRingStore> AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
impl<R: DivisibilityRingStore> AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
Sourcepub fn promise_is_local_pir(
base: R,
max_ideal_gen: El<R>,
nilpotent_power: Option<usize>,
) -> Self
pub fn promise_is_local_pir( base: R, max_ideal_gen: El<R>, nilpotent_power: Option<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 unwrap_element(&self, el: <Self as RingBase>::Element) -> El<R>
pub fn unwrap_element(&self, el: <Self as RingBase>::Element) -> El<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 unwrap_self(self) -> R
pub fn unwrap_self(self) -> 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.
Trait Implementations§
Source§impl<R1, R2> CanHomFrom<AsFieldBase<R1>> for AsLocalPIRBase<R2>where
R1: RingStore,
R2: RingStore,
R2::Type: CanHomFrom<R1::Type> + DivisibilityRing,
R1::Type: DivisibilityRing,
impl<R1, R2> CanHomFrom<AsFieldBase<R1>> for AsLocalPIRBase<R2>where
R1: RingStore,
R2: RingStore,
R2::Type: CanHomFrom<R1::Type> + DivisibilityRing,
R1::Type: DivisibilityRing,
type Homomorphism = <<R2 as RingStore>::Type as CanHomFrom<<R1 as RingStore>::Type>>::Homomorphism
fn has_canonical_hom( &self, from: &AsFieldBase<R1>, ) -> Option<Self::Homomorphism>
fn map_in( &self, from: &AsFieldBase<R1>, el: <AsFieldBase<R1> as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &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, )
Source§impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<AsLocalPIRBase<AsLocalPIRStore>> for FreeAlgebraImplBase<R2, V2, A2, C2>where
AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R1, V1, A1, C1>>,
R1: RingStore,
R1::Type: LinSolveRing,
V1: VectorView<El<R1>>,
A1: Allocator + Clone,
C1: ConvolutionAlgorithm<R1::Type>,
R2: RingStore,
R2::Type: LinSolveRing + CanHomFrom<R1::Type>,
V2: VectorView<El<R2>>,
A2: Allocator + Clone,
C2: ConvolutionAlgorithm<R2::Type>,
impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<AsLocalPIRBase<AsLocalPIRStore>> for FreeAlgebraImplBase<R2, V2, A2, C2>where
AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R1, V1, A1, C1>>,
R1: RingStore,
R1::Type: LinSolveRing,
V1: VectorView<El<R1>>,
A1: Allocator + Clone,
C1: ConvolutionAlgorithm<R1::Type>,
R2: RingStore,
R2::Type: LinSolveRing + CanHomFrom<R1::Type>,
V2: VectorView<El<R2>>,
A2: Allocator + Clone,
C2: ConvolutionAlgorithm<R2::Type>,
type Homomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Homomorphism
fn has_canonical_hom( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, ) -> Option<Self::Homomorphism>
fn map_in( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, el: LocalPIREl<AsLocalPIRStore>, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &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, )
Source§impl<AsLocalPIRStore> CanHomFrom<AsLocalPIRBase<AsLocalPIRStore>> for ZnBase
impl<AsLocalPIRStore> CanHomFrom<AsLocalPIRBase<AsLocalPIRStore>> for ZnBase
type Homomorphism = <ZnBase as CanHomFrom<ZnBase>>::Homomorphism
fn has_canonical_hom( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, ) -> Option<Self::Homomorphism>
fn map_in( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, el: LocalPIREl<AsLocalPIRStore>, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &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, )
Source§impl<AsLocalPIRStore, I, J> CanHomFrom<AsLocalPIRBase<AsLocalPIRStore>> for ZnBase<J>where
AsLocalPIRStore: RingStore<Type = ZnBase<I>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
impl<AsLocalPIRStore, I, J> CanHomFrom<AsLocalPIRBase<AsLocalPIRStore>> for ZnBase<J>where
AsLocalPIRStore: RingStore<Type = ZnBase<I>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
type Homomorphism = <ZnBase<J> as CanHomFrom<ZnBase<I>>>::Homomorphism
fn has_canonical_hom( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, ) -> Option<Self::Homomorphism>
fn map_in( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, el: LocalPIREl<AsLocalPIRStore>, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &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, )
Source§impl<R1, R2> CanHomFrom<AsLocalPIRBase<R1>> for AsFieldBase<R2>where
R1: RingStore,
R2: RingStore,
R2::Type: CanHomFrom<R1::Type> + DivisibilityRing,
R1::Type: DivisibilityRing,
impl<R1, R2> CanHomFrom<AsLocalPIRBase<R1>> for AsFieldBase<R2>where
R1: RingStore,
R2: RingStore,
R2::Type: CanHomFrom<R1::Type> + DivisibilityRing,
R1::Type: DivisibilityRing,
type Homomorphism = <<R2 as RingStore>::Type as CanHomFrom<<R1 as RingStore>::Type>>::Homomorphism
fn has_canonical_hom( &self, from: &AsLocalPIRBase<R1>, ) -> Option<Self::Homomorphism>
fn map_in( &self, from: &AsLocalPIRBase<R1>, el: <AsLocalPIRBase<R1> as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &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, )
Source§impl<R: DivisibilityRingStore, S: DivisibilityRingStore> CanHomFrom<AsLocalPIRBase<S>> for AsLocalPIRBase<R>
impl<R: DivisibilityRingStore, S: DivisibilityRingStore> CanHomFrom<AsLocalPIRBase<S>> for AsLocalPIRBase<R>
type Homomorphism = <<R as RingStore>::Type as CanHomFrom<<S as RingStore>::Type>>::Homomorphism
fn has_canonical_hom( &self, from: &AsLocalPIRBase<S>, ) -> Option<Self::Homomorphism>
fn map_in( &self, from: &AsLocalPIRBase<S>, el: LocalPIREl<S>, hom: &Self::Homomorphism, ) -> Self::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &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, )
Source§impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>> for AsLocalPIRBase<AsLocalPIRStore>where
AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R2, V2, A2, C2>>,
R1: RingStore,
R1::Type: LinSolveRing,
V1: VectorView<El<R1>>,
A1: Allocator + Clone,
C1: ConvolutionAlgorithm<R1::Type>,
R2: RingStore,
R2::Type: LinSolveRing + CanHomFrom<R1::Type>,
V2: VectorView<El<R2>>,
A2: Allocator + Clone,
C2: ConvolutionAlgorithm<R2::Type>,
impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>> for AsLocalPIRBase<AsLocalPIRStore>where
AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R2, V2, A2, C2>>,
R1: RingStore,
R1::Type: LinSolveRing,
V1: VectorView<El<R1>>,
A1: Allocator + Clone,
C1: ConvolutionAlgorithm<R1::Type>,
R2: RingStore,
R2::Type: LinSolveRing + CanHomFrom<R1::Type>,
V2: VectorView<El<R2>>,
A2: Allocator + Clone,
C2: ConvolutionAlgorithm<R2::Type>,
type Homomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Homomorphism
fn has_canonical_hom( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, ) -> Option<Self::Homomorphism>
fn map_in( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, el: <FreeAlgebraImplBase<R1, V1, A1, C1> as RingBase>::Element, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &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, )
Source§impl<R: DivisibilityRingStore, S: IntegerRing + ?Sized> CanHomFrom<S> for AsLocalPIRBase<R>
Necessary to potentially implement crate::rings::zn::ZnRing.
impl<R: DivisibilityRingStore, S: IntegerRing + ?Sized> CanHomFrom<S> for AsLocalPIRBase<R>
Necessary to potentially implement crate::rings::zn::ZnRing.
type Homomorphism = <<R as RingStore>::Type as CanHomFrom<S>>::Homomorphism
fn has_canonical_hom(&self, from: &S) -> Option<Self::Homomorphism>
fn map_in( &self, from: &S, el: S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &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, )
Source§impl<AsLocalPIRStore, I, J> CanHomFrom<ZnBase<I>> for AsLocalPIRBase<AsLocalPIRStore>where
AsLocalPIRStore: RingStore<Type = ZnBase<J>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
impl<AsLocalPIRStore, I, J> CanHomFrom<ZnBase<I>> for AsLocalPIRBase<AsLocalPIRStore>where
AsLocalPIRStore: RingStore<Type = ZnBase<J>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
type Homomorphism = <ZnBase<J> as CanHomFrom<ZnBase<I>>>::Homomorphism
fn has_canonical_hom(&self, from: &ZnBase<I>) -> Option<Self::Homomorphism>
fn map_in( &self, from: &ZnBase<I>, el: <ZnBase<I> as RingBase>::Element, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &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, )
Source§impl<AsLocalPIRStore> CanHomFrom<ZnBase> for AsLocalPIRBase<AsLocalPIRStore>
impl<AsLocalPIRStore> CanHomFrom<ZnBase> for AsLocalPIRBase<AsLocalPIRStore>
type Homomorphism = <ZnBase as CanHomFrom<ZnBase>>::Homomorphism
fn has_canonical_hom(&self, from: &ZnBase) -> Option<Self::Homomorphism>
fn map_in( &self, from: &ZnBase, el: <ZnBase as RingBase>::Element, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element
fn mul_assign_map_in( &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, )
Source§impl<R1, R2> CanIsoFromTo<AsFieldBase<R1>> for AsLocalPIRBase<R2>where
R1: RingStore,
R2: RingStore,
R2::Type: CanIsoFromTo<R1::Type> + DivisibilityRing,
R1::Type: DivisibilityRing,
impl<R1, R2> CanIsoFromTo<AsFieldBase<R1>> for AsLocalPIRBase<R2>where
R1: RingStore,
R2: RingStore,
R2::Type: CanIsoFromTo<R1::Type> + DivisibilityRing,
R1::Type: DivisibilityRing,
type Isomorphism = <<R2 as RingStore>::Type as CanIsoFromTo<<R1 as RingStore>::Type>>::Isomorphism
fn has_canonical_iso(&self, from: &AsFieldBase<R1>) -> Option<Self::Isomorphism>
fn map_out( &self, from: &AsFieldBase<R1>, el: Self::Element, iso: &Self::Isomorphism, ) -> <AsFieldBase<R1> as RingBase>::Element
Source§impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<AsLocalPIRBase<AsLocalPIRStore>> for FreeAlgebraImplBase<R2, V2, A2, C2>where
AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R1, V1, A1, C1>>,
R1: RingStore,
R1::Type: LinSolveRing,
V1: VectorView<El<R1>>,
A1: Allocator + Clone,
C1: ConvolutionAlgorithm<R1::Type>,
R2: RingStore,
R2::Type: LinSolveRing + CanIsoFromTo<R1::Type>,
V2: VectorView<El<R2>>,
A2: Allocator + Clone,
C2: ConvolutionAlgorithm<R2::Type>,
impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<AsLocalPIRBase<AsLocalPIRStore>> for FreeAlgebraImplBase<R2, V2, A2, C2>where
AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R1, V1, A1, C1>>,
R1: RingStore,
R1::Type: LinSolveRing,
V1: VectorView<El<R1>>,
A1: Allocator + Clone,
C1: ConvolutionAlgorithm<R1::Type>,
R2: RingStore,
R2::Type: LinSolveRing + CanIsoFromTo<R1::Type>,
V2: VectorView<El<R2>>,
A2: Allocator + Clone,
C2: ConvolutionAlgorithm<R2::Type>,
type Isomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Isomorphism
fn has_canonical_iso( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, ) -> Option<Self::Isomorphism>
fn map_out( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, el: <Self as RingBase>::Element, hom: &Self::Isomorphism, ) -> LocalPIREl<AsLocalPIRStore>
Source§impl<AsLocalPIRStore> CanIsoFromTo<AsLocalPIRBase<AsLocalPIRStore>> for ZnBase
impl<AsLocalPIRStore> CanIsoFromTo<AsLocalPIRBase<AsLocalPIRStore>> for ZnBase
type Isomorphism = <ZnBase as CanIsoFromTo<ZnBase>>::Isomorphism
fn has_canonical_iso( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, ) -> Option<Self::Isomorphism>
fn map_out( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, el: <Self as RingBase>::Element, hom: &Self::Isomorphism, ) -> LocalPIREl<AsLocalPIRStore>
Source§impl<AsLocalPIRStore, I, J> CanIsoFromTo<AsLocalPIRBase<AsLocalPIRStore>> for ZnBase<J>where
AsLocalPIRStore: RingStore<Type = ZnBase<I>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
impl<AsLocalPIRStore, I, J> CanIsoFromTo<AsLocalPIRBase<AsLocalPIRStore>> for ZnBase<J>where
AsLocalPIRStore: RingStore<Type = ZnBase<I>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
type Isomorphism = <ZnBase<J> as CanIsoFromTo<ZnBase<I>>>::Isomorphism
fn has_canonical_iso( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, ) -> Option<Self::Isomorphism>
fn map_out( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, el: <Self as RingBase>::Element, hom: &Self::Isomorphism, ) -> LocalPIREl<AsLocalPIRStore>
Source§impl<R1, R2> CanIsoFromTo<AsLocalPIRBase<R1>> for AsFieldBase<R2>where
R1: RingStore,
R2: RingStore,
R2::Type: CanIsoFromTo<R1::Type> + DivisibilityRing,
R1::Type: DivisibilityRing,
impl<R1, R2> CanIsoFromTo<AsLocalPIRBase<R1>> for AsFieldBase<R2>where
R1: RingStore,
R2: RingStore,
R2::Type: CanIsoFromTo<R1::Type> + DivisibilityRing,
R1::Type: DivisibilityRing,
type Isomorphism = <<R2 as RingStore>::Type as CanIsoFromTo<<R1 as RingStore>::Type>>::Isomorphism
fn has_canonical_iso( &self, from: &AsLocalPIRBase<R1>, ) -> Option<Self::Isomorphism>
fn map_out( &self, from: &AsLocalPIRBase<R1>, el: Self::Element, iso: &Self::Isomorphism, ) -> <AsLocalPIRBase<R1> as RingBase>::Element
Source§impl<R: DivisibilityRingStore, S: DivisibilityRingStore> CanIsoFromTo<AsLocalPIRBase<S>> for AsLocalPIRBase<R>
impl<R: DivisibilityRingStore, S: DivisibilityRingStore> CanIsoFromTo<AsLocalPIRBase<S>> for AsLocalPIRBase<R>
type Isomorphism = <<R as RingStore>::Type as CanIsoFromTo<<S as RingStore>::Type>>::Isomorphism
fn has_canonical_iso( &self, from: &AsLocalPIRBase<S>, ) -> Option<Self::Isomorphism>
fn map_out( &self, from: &AsLocalPIRBase<S>, el: Self::Element, iso: &Self::Isomorphism, ) -> LocalPIREl<S>
Source§impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>> for AsLocalPIRBase<AsLocalPIRStore>where
AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R2, V2, A2, C2>>,
R1: RingStore,
R1::Type: LinSolveRing,
V1: VectorView<El<R1>>,
A1: Allocator + Clone,
C1: ConvolutionAlgorithm<R1::Type>,
R2: RingStore,
R2::Type: LinSolveRing + CanIsoFromTo<R1::Type>,
V2: VectorView<El<R2>>,
A2: Allocator + Clone,
C2: ConvolutionAlgorithm<R2::Type>,
impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>> for AsLocalPIRBase<AsLocalPIRStore>where
AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R2, V2, A2, C2>>,
R1: RingStore,
R1::Type: LinSolveRing,
V1: VectorView<El<R1>>,
A1: Allocator + Clone,
C1: ConvolutionAlgorithm<R1::Type>,
R2: RingStore,
R2::Type: LinSolveRing + CanIsoFromTo<R1::Type>,
V2: VectorView<El<R2>>,
A2: Allocator + Clone,
C2: ConvolutionAlgorithm<R2::Type>,
type Isomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Isomorphism
fn has_canonical_iso( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, ) -> Option<Self::Isomorphism>
fn map_out( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, el: <Self as RingBase>::Element, iso: &Self::Isomorphism, ) -> <FreeAlgebraImplBase<R1, V1, A1, C1> as RingBase>::Element
Source§impl<AsLocalPIRStore, I, J> CanIsoFromTo<ZnBase<I>> for AsLocalPIRBase<AsLocalPIRStore>where
AsLocalPIRStore: RingStore<Type = ZnBase<J>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
impl<AsLocalPIRStore, I, J> CanIsoFromTo<ZnBase<I>> for AsLocalPIRBase<AsLocalPIRStore>where
AsLocalPIRStore: RingStore<Type = ZnBase<J>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
type Isomorphism = <ZnBase<J> as CanIsoFromTo<ZnBase<I>>>::Isomorphism
fn has_canonical_iso(&self, from: &ZnBase<I>) -> Option<Self::Isomorphism>
fn map_out( &self, from: &ZnBase<I>, el: <Self as RingBase>::Element, iso: &Self::Isomorphism, ) -> <ZnBase<I> as RingBase>::Element
Source§impl<AsLocalPIRStore> CanIsoFromTo<ZnBase> for AsLocalPIRBase<AsLocalPIRStore>
impl<AsLocalPIRStore> CanIsoFromTo<ZnBase> for AsLocalPIRBase<AsLocalPIRStore>
type Isomorphism = <ZnBase as CanIsoFromTo<ZnBase>>::Isomorphism
fn has_canonical_iso(&self, from: &ZnBase) -> Option<Self::Isomorphism>
fn map_out( &self, from: &ZnBase, el: <Self as RingBase>::Element, iso: &Self::Isomorphism, ) -> <ZnBase as RingBase>::Element
Source§impl<R> Clone for AsLocalPIRBase<R>
impl<R> Clone for AsLocalPIRBase<R>
Source§impl<R: DivisibilityRingStore> ComputeInnerProduct for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
impl<R: DivisibilityRingStore> ComputeInnerProduct for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
Source§fn inner_product<I: Iterator<Item = (Self::Element, Self::Element)>>(
&self,
els: I,
) -> Self::Element
fn inner_product<I: Iterator<Item = (Self::Element, Self::Element)>>( &self, els: I, ) -> Self::Element
sum_i lhs[i] * rhs[i].Source§impl<R: DivisibilityRingStore> DelegateRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
impl<R: DivisibilityRingStore> DelegateRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
type Element = LocalPIREl<R>
type Base = <R as RingStore>::Type
fn get_delegate(&self) -> &Self::Base
fn delegate(&self, el: Self::Element) -> <Self::Base as RingBase>::Element
fn delegate_mut<'a>( &self, el: &'a mut Self::Element, ) -> &'a mut <Self::Base as RingBase>::Element
fn delegate_ref<'a>( &self, el: &'a Self::Element, ) -> &'a <Self::Base as RingBase>::Element
fn rev_delegate(&self, el: <Self::Base as RingBase>::Element) -> Self::Element
fn postprocess_delegate_mut(&self, el: &mut Self::Element)
Source§fn element_cast(&self, el: Self::Element) -> <Self as RingBase>::Element
fn element_cast(&self, el: Self::Element) -> <Self as RingBase>::Element
Source§impl<R: DivisibilityRingStore> DivisibilityRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
impl<R: DivisibilityRingStore> DivisibilityRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
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§type PreparedDivisorData = ()
type PreparedDivisorData = ()
Source§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 prepare_divisor(&self, x: Self::Element) -> PreparedDivisor<Self>
fn prepare_divisor(&self, x: Self::Element) -> PreparedDivisor<Self>
Source§fn checked_left_div_prepared(
&self,
lhs: &Self::Element,
rhs: &PreparedDivisor<Self>,
) -> Option<Self::Element>
fn checked_left_div_prepared( &self, lhs: &Self::Element, rhs: &PreparedDivisor<Self>, ) -> Option<Self::Element>
DivisibilityRing::checked_left_div() but for a prepared divisor. Read moreSource§fn divides_left_prepared(
&self,
lhs: &Self::Element,
rhs: &PreparedDivisor<Self>,
) -> bool
fn divides_left_prepared( &self, lhs: &Self::Element, rhs: &PreparedDivisor<Self>, ) -> bool
DivisibilityRing::divides_left() but for a prepared divisor. Read moreSource§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: DivisibilityRingStore> EuclideanRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
impl<R: DivisibilityRingStore> EuclideanRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
Source§fn euclidean_div_rem(
&self,
lhs: Self::Element,
rhs: &Self::Element,
) -> (Self::Element, Self::Element)
fn euclidean_div_rem( &self, lhs: Self::Element, rhs: &Self::Element, ) -> (Self::Element, Self::Element)
Source§fn euclidean_deg(&self, val: &Self::Element) -> Option<usize>
fn euclidean_deg(&self, val: &Self::Element) -> Option<usize>
EuclideanRing.Source§impl<R: DivisibilityRingStore> Field for AsLocalPIRBase<R>
impl<R: DivisibilityRingStore> Field for AsLocalPIRBase<R>
Source§impl<R> FromModulusCreateableZnRing for AsLocalPIRBase<RingValue<R>>
impl<R> FromModulusCreateableZnRing for AsLocalPIRBase<RingValue<R>>
Source§impl<R> InterpolationBaseRing for AsLocalPIRBase<R>
impl<R> InterpolationBaseRing for AsLocalPIRBase<R>
Source§type ExtendedRingBase<'a> = <<R as RingStore>::Type as InterpolationBaseRing>::ExtendedRingBase<'a>
where
Self: 'a
type ExtendedRingBase<'a> = <<R as RingStore>::Type as InterpolationBaseRing>::ExtendedRingBase<'a> where Self: 'a
DivisibilityRing + PrincipalIdealRing + Domain
is necessary, because of a compiler bug, see also
crate::compute_locally::EvaluatePolyLocallyRing::LocalRingBasetype ExtendedRing<'a> = <<R as RingStore>::Type as InterpolationBaseRing>::ExtendedRing<'a> where Self: 'a
fn in_base<'a, S>(&self, ext_ring: S, el: El<S>) -> Option<Self::Element>where
Self: 'a,
S: RingStore<Type = Self::ExtendedRingBase<'a>>,
fn in_extension<'a, S>(&self, ext_ring: S, el: Self::Element) -> El<S>where
Self: 'a,
S: RingStore<Type = Self::ExtendedRingBase<'a>>,
Source§fn interpolation_points<'a>(
&'a self,
count: usize,
) -> (Self::ExtendedRing<'a>, Vec<El<Self::ExtendedRing<'a>>>)
fn interpolation_points<'a>( &'a self, count: usize, ) -> (Self::ExtendedRing<'a>, Vec<El<Self::ExtendedRing<'a>>>)
count points such that the difference between any two of them
is a non-zero-divisor. Read moreSource§impl<R: DivisibilityRingStore> KaratsubaHint for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
impl<R: DivisibilityRingStore> KaratsubaHint for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
Source§fn karatsuba_threshold(&self) -> usize
fn karatsuba_threshold(&self) -> usize
KaratsubaAlgorithm will use the Karatsuba algorithm. Read moreSource§impl<R> PartialEq for AsLocalPIRBase<R>
impl<R> PartialEq for AsLocalPIRBase<R>
Source§impl<R: DivisibilityRingStore> PrincipalIdealRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
impl<R: DivisibilityRingStore> PrincipalIdealRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
Source§fn checked_div_min(
&self,
lhs: &Self::Element,
rhs: &Self::Element,
) -> Option<Self::Element>
fn checked_div_min( &self, lhs: &Self::Element, rhs: &Self::Element, ) -> Option<Self::Element>
DivisibilityRing::checked_left_div() this computes a “quotient” q
of lhs and rhs, if it exists. However, we impose the additional constraint
that this quotient be minimal, i.e. there is no q' with q' | q properly and
q' * rhs = lhs. Read moreSource§fn extended_ideal_gen(
&self,
lhs: &Self::Element,
rhs: &Self::Element,
) -> (Self::Element, Self::Element, Self::Element)
fn extended_ideal_gen( &self, lhs: &Self::Element, rhs: &Self::Element, ) -> (Self::Element, Self::Element, Self::Element)
g of the ideal (lhs, rhs)
as g = s * lhs + t * rhs. Read moreSource§fn create_elimination_matrix(
&self,
a: &Self::Element,
b: &Self::Element,
) -> ([Self::Element; 4], Self::Element)
fn create_elimination_matrix( &self, a: &Self::Element, b: &Self::Element, ) -> ([Self::Element; 4], Self::Element)
A of unit determinant such that A * (a, b)^T = (d, 0).
Returns (A, d).Source§fn annihilator(&self, val: &Self::Element) -> Self::Element
fn annihilator(&self, val: &Self::Element) -> Self::Element
Source§impl<R: DivisibilityRingStore> PrincipalLocalRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
impl<R: DivisibilityRingStore> PrincipalLocalRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
Source§fn max_ideal_gen(&self) -> &Self::Element
fn max_ideal_gen(&self) -> &Self::Element
Source§fn nilpotent_power(&self) -> Option<usize>
fn nilpotent_power(&self) -> Option<usize>
e such that p^e = 0 where p is
the generator of the maximal ideal.Source§impl<R: DivisibilityRingStore> StrassenHint for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
impl<R: DivisibilityRingStore> StrassenHint for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
Source§fn strassen_threshold(&self) -> usize
fn strassen_threshold(&self) -> usize
StrassenAlgorithm will use the Strassen algorithm. Read moreimpl<R> Copy for AsLocalPIRBase<R>
impl<R: DivisibilityRingStore> DelegateRingImplFiniteRing for AsLocalPIRBase<R>where
R::Type: DivisibilityRing,
impl<R: DivisibilityRingStore> Domain for AsLocalPIRBase<R>
Auto Trait Implementations§
impl<R> Freeze for AsLocalPIRBase<R>
impl<R> RefUnwindSafe for AsLocalPIRBase<R>
impl<R> Send for AsLocalPIRBase<R>
impl<R> Sync for AsLocalPIRBase<R>
impl<R> Unpin for AsLocalPIRBase<R>
impl<R> UnwindSafe for AsLocalPIRBase<R>
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
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
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])Source§impl<R> DivisibilityRing for R
impl<R> DivisibilityRing for R
Source§type PreparedDivisorData = PreparedDivisor<<R as DelegateRing>::Base>
type PreparedDivisorData = PreparedDivisor<<R as DelegateRing>::Base>
Source§default fn checked_left_div(
&self,
lhs: &<R as RingBase>::Element,
rhs: &<R as RingBase>::Element,
) -> Option<<R as RingBase>::Element>
default fn checked_left_div( &self, lhs: &<R as RingBase>::Element, rhs: &<R as RingBase>::Element, ) -> Option<<R as RingBase>::Element>
x such that rhs * x = lhs, and
returns it if it exists. Read moreSource§default fn balance_factor<'a, I>(
&self,
elements: I,
) -> Option<<R as RingBase>::Element>
default fn balance_factor<'a, I>( &self, elements: I, ) -> Option<<R as RingBase>::Element>
Source§fn prepare_divisor(&self, x: <R as RingBase>::Element) -> PreparedDivisor<R>
fn prepare_divisor(&self, x: <R as RingBase>::Element) -> PreparedDivisor<R>
Source§default fn checked_left_div_prepared(
&self,
lhs: &<R as RingBase>::Element,
rhs: &PreparedDivisor<R>,
) -> Option<<R as RingBase>::Element>
default fn checked_left_div_prepared( &self, lhs: &<R as RingBase>::Element, rhs: &PreparedDivisor<R>, ) -> Option<<R as RingBase>::Element>
DivisibilityRing::checked_left_div() but for a prepared divisor. Read moreSource§default fn divides_left_prepared(
&self,
lhs: &<R as RingBase>::Element,
rhs: &PreparedDivisor<R>,
) -> bool
default fn divides_left_prepared( &self, lhs: &<R as RingBase>::Element, rhs: &PreparedDivisor<R>, ) -> 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 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> FactorPolyField for R
impl<R> FactorPolyField for R
Source§fn factor_poly<P>(
poly_ring: P,
poly: &<<P as RingStore>::Type as RingBase>::Element,
) -> (Vec<(<<P as RingStore>::Type as RingBase>::Element, usize)>, <R as RingBase>::Element)where
P: RingStore,
<P as RingStore>::Type: PolyRing + EuclideanRing,
<<P as RingStore>::Type as RingExtension>::BaseRing: RingStore<Type = R>,
fn factor_poly<P>(
poly_ring: P,
poly: &<<P as RingStore>::Type as RingBase>::Element,
) -> (Vec<(<<P as RingStore>::Type as RingBase>::Element, usize)>, <R as RingBase>::Element)where
P: RingStore,
<P as RingStore>::Type: PolyRing + EuclideanRing,
<<P as RingStore>::Type as RingExtension>::BaseRing: RingStore<Type = R>,
fn is_irred<P>(poly_ring: P, poly: &El<P>) -> boolwhere
P: RingStore + Copy,
P::Type: PolyRing + EuclideanRing,
<P::Type as RingExtension>::BaseRing: RingStore<Type = Self>,
Source§impl<R> FiniteField for R
impl<R> FiniteField for R
type FrobeniusData = UnsafeAnyFrobeniusDataGuarded<R>
default fn create_frobenius( &self, exponent_of_p: usize, ) -> (<R as FiniteField>::FrobeniusData, usize)
default fn apply_frobenius( &self, _frobenius_data: &<R as FiniteField>::FrobeniusData, exponent_of_p: usize, x: <R as RingBase>::Element, ) -> <R as RingBase>::Element
Source§impl<R> FiniteRing for R
impl<R> FiniteRing for R
type ElementsIter<'a> = DelegateFiniteRingElementsIter<'a, R> where R: 'a
Source§fn elements<'a>(&'a self) -> <R as FiniteRing>::ElementsIter<'a>
fn elements<'a>(&'a self) -> <R as FiniteRing>::ElementsIter<'a>
Source§default fn random_element<G>(&self, rng: G) -> <R as RingBase>::Element
default fn random_element<G>(&self, rng: G) -> <R as RingBase>::Element
rng.Source§impl<R> FiniteRingSpecializable for R
impl<R> FiniteRingSpecializable for R
fn specialize<O>(op: O) -> Result<<O as FiniteRingOperation<R>>::Output, ()>where
O: FiniteRingOperation<R>,
fn is_finite_ring() -> bool
Source§impl<R> FreeAlgebra for R
impl<R> FreeAlgebra for R
type VectorRepresentation<'a> = <<R as DelegateRing>::Base as FreeAlgebra>::VectorRepresentation<'a> where R: 'a
Source§default fn canonical_gen(&self) -> <R as RingBase>::Element
default fn canonical_gen(&self) -> <R as RingBase>::Element
Source§default fn from_canonical_basis<V>(&self, vec: V) -> <R as RingBase>::Elementwhere
V: IntoIterator<Item = <<<R as RingExtension>::BaseRing as RingStore>::Type as RingBase>::Element>,
<V as IntoIterator>::IntoIter: DoubleEndedIterator,
default fn from_canonical_basis<V>(&self, vec: V) -> <R as RingBase>::Elementwhere
V: IntoIterator<Item = <<<R as RingExtension>::BaseRing as RingStore>::Type as RingBase>::Element>,
<V as IntoIterator>::IntoIter: DoubleEndedIterator,
x^i where x is the canonical generator given by FreeAlgebra::canonical_gen()
and i goes from 0 to rank - 1. Read moreSource§default fn rank(&self) -> usize
default fn rank(&self) -> usize
Source§default fn wrt_canonical_basis<'a>(
&'a self,
el: &'a <R as RingBase>::Element,
) -> <R as FreeAlgebra>::VectorRepresentation<'a>
default fn wrt_canonical_basis<'a>( &'a self, el: &'a <R as RingBase>::Element, ) -> <R as FreeAlgebra>::VectorRepresentation<'a>
x^i where x is the canonical generator given by FreeAlgebra::canonical_gen()
and i goes from 0 to rank - 1. Read moreSource§fn from_canonical_basis_extended<V>(&self, vec: V) -> Self::Element
fn from_canonical_basis_extended<V>(&self, vec: V) -> Self::Element
FreeAlgebra::from_canonical_basis(), this computes the sum sum_i vec[i] * x^i where x is the
canonical generator given by FreeAlgebra::canonical_gen(). Unlike FreeAlgebra::from_canonical_basis(),
vec can return any number elements.fn charpoly<P, H>(&self, el: &Self::Element, poly_ring: P, hom: H) -> El<P>where
P: RingStore,
P::Type: PolyRing,
<<P::Type as RingExtension>::BaseRing as RingStore>::Type: LinSolveRing,
H: Homomorphism<<Self::BaseRing as RingStore>::Type, <<P::Type as RingExtension>::BaseRing as RingStore>::Type>,
Source§fn trace(&self, el: Self::Element) -> El<Self::BaseRing>
fn trace(&self, el: Self::Element) -> El<Self::BaseRing>
a in this ring extension, which is defined as the
matrix trace of the multiplication-by-a map. Read moreSource§impl<R> HashableElRing for R
impl<R> HashableElRing for R
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 moreSource§impl<R> KaratsubaHint for R
impl<R> KaratsubaHint for R
Source§default fn karatsuba_threshold(&self) -> usize
default fn karatsuba_threshold(&self) -> usize
KaratsubaAlgorithm will use the Karatsuba algorithm. Read moreSource§impl<R> LinSolveRing for Rwhere
R: PrincipalIdealRing + ?Sized,
impl<R> LinSolveRing for Rwhere
R: PrincipalIdealRing + ?Sized,
Source§default fn solve_right<V1, V2, V3, A>(
&self,
lhs: SubmatrixMut<'_, V1, <R as RingBase>::Element>,
rhs: SubmatrixMut<'_, V2, <R as RingBase>::Element>,
out: SubmatrixMut<'_, V3, <R as RingBase>::Element>,
allocator: A,
) -> SolveResultwhere
V1: AsPointerToSlice<<R as RingBase>::Element>,
V2: AsPointerToSlice<<R as RingBase>::Element>,
V3: AsPointerToSlice<<R as RingBase>::Element>,
A: Allocator,
default fn solve_right<V1, V2, V3, A>(
&self,
lhs: SubmatrixMut<'_, V1, <R as RingBase>::Element>,
rhs: SubmatrixMut<'_, V2, <R as RingBase>::Element>,
out: SubmatrixMut<'_, V3, <R as RingBase>::Element>,
allocator: A,
) -> SolveResultwhere
V1: AsPointerToSlice<<R as RingBase>::Element>,
V2: AsPointerToSlice<<R as RingBase>::Element>,
V3: AsPointerToSlice<<R as RingBase>::Element>,
A: Allocator,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R> PolyGCDLocallyDomain for R
impl<R> PolyGCDLocallyDomain for R
Source§type LocalRingBase<'ring> = R
where
R: 'ring
type LocalRingBase<'ring> = R where R: 'ring
'ring and 'data,
see also crate::compute_locally::EvaluatePolyLocallyRing::LocalRingBasetype LocalRing<'ring> = RingRef<'ring, R> where R: 'ring
type LocalFieldBase<'ring> = R where R: 'ring
type LocalField<'ring> = RingRef<'ring, R> where R: 'ring
type SuitableIdeal<'ring> = RingRef<'ring, R> where R: 'ring
Source§fn heuristic_exponent<'ring, 'element, IteratorType>(
&self,
_maximal_ideal: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
_poly_deg: usize,
_coefficients: IteratorType,
) -> usize
fn heuristic_exponent<'ring, 'element, IteratorType>( &self, _maximal_ideal: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>, _poly_deg: usize, _coefficients: IteratorType, ) -> usize
e such that we hope that the factors of a polynomial of given degree,
involving the given coefficient can already be read of (via PolyGCDLocallyDomain::reconstruct_ring_el())
their reductions modulo I^e. Note that this is just a heuristic, and if it does not work,
the implementation will gradually try larger e. Thus, even if this function returns constant
1, correctness will not be affected, but giving a good guess can improve performancefn maximal_ideal_factor_count<'ring>(
&self,
ideal: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
) -> usizewhere
R: 'ring,
Source§fn random_suitable_ideal<'ring, RandomNumberFunction>(
&'ring self,
rng: RandomNumberFunction,
) -> <R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>
fn random_suitable_ideal<'ring, RandomNumberFunction>( &'ring self, rng: RandomNumberFunction, ) -> <R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>
Source§fn local_field_at<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
max_ideal_idx: usize,
) -> <R as PolyGCDLocallyDomain>::LocalField<'ring>where
R: 'ring,
fn local_field_at<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
max_ideal_idx: usize,
) -> <R as PolyGCDLocallyDomain>::LocalField<'ring>where
R: 'ring,
Source§fn local_ring_at<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
e: usize,
max_ideal_idx: usize,
) -> <R as PolyGCDLocallyDomain>::LocalRing<'ring>where
R: 'ring,
fn local_ring_at<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
e: usize,
max_ideal_idx: usize,
) -> <R as PolyGCDLocallyDomain>::LocalRing<'ring>where
R: 'ring,
R / mi^e, where mi is the i-th maximal ideal over I.Source§fn reduce_ring_el<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
to: (&<R as PolyGCDLocallyDomain>::LocalRing<'ring>, usize),
max_ideal_idx: usize,
x: <R as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
fn reduce_ring_el<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
to: (&<R as PolyGCDLocallyDomain>::LocalRing<'ring>, usize),
max_ideal_idx: usize,
x: <R as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
Source§fn reduce_partial<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: (&<R as PolyGCDLocallyDomain>::LocalRing<'ring>, usize),
to: (&<R as PolyGCDLocallyDomain>::LocalRing<'ring>, usize),
max_ideal_idx: usize,
x: <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
fn reduce_partial<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: (&<R as PolyGCDLocallyDomain>::LocalRing<'ring>, usize),
to: (&<R as PolyGCDLocallyDomain>::LocalRing<'ring>, usize),
max_ideal_idx: usize,
x: <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
Source§fn lift_partial<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: (&<R as PolyGCDLocallyDomain>::LocalRing<'ring>, usize),
to: (&<R as PolyGCDLocallyDomain>::LocalRing<'ring>, usize),
max_ideal_idx: usize,
x: <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
fn lift_partial<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: (&<R as PolyGCDLocallyDomain>::LocalRing<'ring>, usize),
to: (&<R as PolyGCDLocallyDomain>::LocalRing<'ring>, usize),
max_ideal_idx: usize,
x: <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
y in R / mi^to_e such that y = x mod mi^from_e.
In particular, y does not have to be “short” in any sense, but any lift
is a valid result.Source§fn reconstruct_ring_el<'local, 'element, 'ring, V1, V2>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: V1,
e: usize,
x: V2,
) -> <R as RingBase>::Elementwhere
'ring: 'local,
'ring: 'element,
R: 'ring,
V1: VectorFn<&'local <R as PolyGCDLocallyDomain>::LocalRing<'ring>>,
V2: VectorFn<&'element <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Element>,
<R as PolyGCDLocallyDomain>::LocalRing<'ring>: 'local,
<<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Element: 'element,
fn reconstruct_ring_el<'local, 'element, 'ring, V1, V2>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: V1,
e: usize,
x: V2,
) -> <R as RingBase>::Elementwhere
'ring: 'local,
'ring: 'element,
R: 'ring,
V1: VectorFn<&'local <R as PolyGCDLocallyDomain>::LocalRing<'ring>>,
V2: VectorFn<&'element <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Element>,
<R as PolyGCDLocallyDomain>::LocalRing<'ring>: 'local,
<<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Element: 'element,
x in R such that x mod mi^e is equal to the given value,
for every maximal ideal mi over I.
In cases where the factors of polynomials in R[X] do not necessarily have coefficients
in R, this function might have to do rational reconstruction.fn dbg_ideal<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
out: &mut Formatter<'_>,
) -> Result<(), Error>where
R: 'ring,
Source§impl<R> PolyTFracGCDRing for R
impl<R> PolyTFracGCDRing for R
Source§default fn power_decomposition<P>(
poly_ring: P,
poly: &<<P as RingStore>::Type as RingBase>::Element,
) -> Vec<(<<P as RingStore>::Type as RingBase>::Element, usize)>
default fn power_decomposition<P>( poly_ring: P, poly: &<<P as RingStore>::Type as RingBase>::Element, ) -> Vec<(<<P as RingStore>::Type as RingBase>::Element, usize)>
f1, f2, ... such that a f = f1 f2^2 f3^3 ...
for some non-zero-divisor a of this ring. They are returned as tuples (fi, i)
where deg(fi) > 0. Read moreSource§default fn gcd<P>(
poly_ring: P,
lhs: &<<P as RingStore>::Type as RingBase>::Element,
rhs: &<<P as RingStore>::Type as RingBase>::Element,
) -> <<P as RingStore>::Type as RingBase>::Element
default fn gcd<P>( poly_ring: P, lhs: &<<P as RingStore>::Type as RingBase>::Element, rhs: &<<P as RingStore>::Type as RingBase>::Element, ) -> <<P as RingStore>::Type as RingBase>::Element
f, g over the fraction field,
which is the largest-degree polynomial d such that d | a f, a g for some non-zero-divisor
a of this ring. Read moreSource§fn squarefree_part<P>(poly_ring: P, poly: &El<P>) -> El<P>where
P: RingStore + Copy,
P::Type: PolyRing + DivisibilityRing,
<P::Type as RingExtension>::BaseRing: RingStore<Type = Self>,
fn squarefree_part<P>(poly_ring: P, poly: &El<P>) -> El<P>where
P: RingStore + Copy,
P::Type: PolyRing + DivisibilityRing,
<P::Type as RingExtension>::BaseRing: RingStore<Type = Self>,
f, which is the largest-degree squarefree
polynomial d such that d | a f for some non-zero-divisor a of this ring. Read moreSource§impl<R> RingBase for R
impl<R> RingBase for R
Source§type Element = <R as DelegateRing>::Element
type Element = <R as DelegateRing>::Element
default fn clone_el( &self, val: &<R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn add_assign_ref( &self, lhs: &mut <R as RingBase>::Element, rhs: &<R as RingBase>::Element, )
default fn add_assign( &self, lhs: &mut <R as RingBase>::Element, rhs: <R as RingBase>::Element, )
default fn sub_assign_ref( &self, lhs: &mut <R as RingBase>::Element, rhs: &<R as RingBase>::Element, )
Source§default fn sub_self_assign(
&self,
lhs: &mut <R as RingBase>::Element,
rhs: <R as RingBase>::Element,
)
default fn sub_self_assign( &self, lhs: &mut <R as RingBase>::Element, rhs: <R as RingBase>::Element, )
lhs := rhs - lhs.Source§default fn sub_self_assign_ref(
&self,
lhs: &mut <R as RingBase>::Element,
rhs: &<R as RingBase>::Element,
)
default fn sub_self_assign_ref( &self, lhs: &mut <R as RingBase>::Element, rhs: &<R as RingBase>::Element, )
lhs := rhs - lhs.default fn negate_inplace(&self, lhs: &mut <R as RingBase>::Element)
default fn mul_assign( &self, lhs: &mut <R as RingBase>::Element, rhs: <R as RingBase>::Element, )
default fn mul_assign_ref( &self, lhs: &mut <R as RingBase>::Element, rhs: &<R as RingBase>::Element, )
default fn square(&self, value: &mut <R as RingBase>::Element)
default fn zero(&self) -> <R as RingBase>::Element
default fn one(&self) -> <R as RingBase>::Element
default fn neg_one(&self) -> <R as RingBase>::Element
default fn from_int(&self, value: i32) -> <R as RingBase>::Element
default fn eq_el( &self, lhs: &<R as RingBase>::Element, rhs: &<R as RingBase>::Element, ) -> bool
default fn is_zero(&self, value: &<R as RingBase>::Element) -> bool
default fn is_one(&self, value: &<R as RingBase>::Element) -> bool
default fn is_neg_one(&self, value: &<R as RingBase>::Element) -> bool
Source§default fn is_commutative(&self) -> bool
default fn is_commutative(&self) -> bool
a * b = b * a for all elements a, b.
Note that addition is assumed to be always commutative.Source§default fn is_noetherian(&self) -> bool
default fn is_noetherian(&self) -> bool
Source§default fn dbg<'a>(
&self,
value: &<R as RingBase>::Element,
out: &mut Formatter<'a>,
) -> Result<(), Error>
default fn dbg<'a>( &self, value: &<R as RingBase>::Element, out: &mut Formatter<'a>, ) -> Result<(), Error>
Source§default fn dbg_within<'a>(
&self,
value: &<R as RingBase>::Element,
out: &mut Formatter<'a>,
env: EnvBindingStrength,
) -> Result<(), Error>
default fn dbg_within<'a>( &self, value: &<R as RingBase>::Element, out: &mut Formatter<'a>, env: EnvBindingStrength, ) -> Result<(), Error>
value to out, taking into account the possible context
to place parenthesis as needed. Read moredefault fn negate( &self, value: <R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn sub_assign( &self, lhs: &mut <R as RingBase>::Element, rhs: <R as RingBase>::Element, )
default fn add_ref( &self, lhs: &<R as RingBase>::Element, rhs: &<R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn add_ref_fst( &self, lhs: &<R as RingBase>::Element, rhs: <R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn add_ref_snd( &self, lhs: <R as RingBase>::Element, rhs: &<R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn add( &self, lhs: <R as RingBase>::Element, rhs: <R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn sub_ref( &self, lhs: &<R as RingBase>::Element, rhs: &<R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn sub_ref_fst( &self, lhs: &<R as RingBase>::Element, rhs: <R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn sub_ref_snd( &self, lhs: <R as RingBase>::Element, rhs: &<R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn sub( &self, lhs: <R as RingBase>::Element, rhs: <R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn mul_ref( &self, lhs: &<R as RingBase>::Element, rhs: &<R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn mul_ref_fst( &self, lhs: &<R as RingBase>::Element, rhs: <R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn mul_ref_snd( &self, lhs: <R as RingBase>::Element, rhs: &<R as RingBase>::Element, ) -> <R as RingBase>::Element
default fn mul( &self, lhs: <R as RingBase>::Element, rhs: <R as RingBase>::Element, ) -> <R as RingBase>::Element
Source§default fn is_approximate(&self) -> bool
default fn is_approximate(&self) -> bool
f32 or
f64, to represent real or complex numbers. Read moredefault fn mul_assign_int(&self, lhs: &mut <R as RingBase>::Element, rhs: i32)
default fn mul_int( &self, lhs: <R as RingBase>::Element, rhs: i32, ) -> <R as RingBase>::Element
default fn mul_int_ref( &self, lhs: &<R as RingBase>::Element, rhs: i32, ) -> <R as RingBase>::Element
Source§default fn pow_gen<S>(
&self,
x: <R as RingBase>::Element,
power: &<<S as RingStore>::Type as RingBase>::Element,
integers: S,
) -> <R as RingBase>::Element
default fn pow_gen<S>( &self, x: <R as RingBase>::Element, power: &<<S as RingStore>::Type as RingBase>::Element, integers: S, ) -> <R as RingBase>::Element
x to the power of an arbitrary, nonnegative integer given by
a custom integer ring implementation. Read moreSource§default fn characteristic<I>(
&self,
ZZ: I,
) -> Option<<<I as RingStore>::Type as RingBase>::Element>
default fn characteristic<I>( &self, ZZ: I, ) -> Option<<<I as RingStore>::Type as RingBase>::Element>
ZZ. Read moreSource§impl<R> RingExtension for R
impl<R> RingExtension for R
Source§type BaseRing = <<R as DelegateRing>::Base as RingExtension>::BaseRing
type BaseRing = <<R as DelegateRing>::Base as RingExtension>::BaseRing
Source§fn base_ring<'a>(&'a self) -> &'a <R as RingExtension>::BaseRing
fn base_ring<'a>(&'a self) -> &'a <R as RingExtension>::BaseRing
Source§fn from(
&self,
x: <<<R as RingExtension>::BaseRing as RingStore>::Type as RingBase>::Element,
) -> <R as RingBase>::Element
fn from( &self, x: <<<R as RingExtension>::BaseRing as RingStore>::Type as RingBase>::Element, ) -> <R as RingBase>::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§impl<R> SerializableElementRing for Rwhere
R: DelegateRing + ?Sized,
<R as DelegateRing>::Base: DivisibilityRing + SerializableElementRing,
impl<R> SerializableElementRing for Rwhere
R: DelegateRing + ?Sized,
<R as DelegateRing>::Base: DivisibilityRing + SerializableElementRing,
Source§default fn serialize<S>(
&self,
el: &<R as RingBase>::Element,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
default fn serialize<S>(
&self,
el: &<R as RingBase>::Element,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Source§default fn deserialize<'de, D>(
&self,
deserializer: D,
) -> Result<<R as RingBase>::Element, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
default fn deserialize<'de, D>(
&self,
deserializer: D,
) -> Result<<R as RingBase>::Element, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl<R> StrassenHint for R
impl<R> StrassenHint for R
Source§default fn strassen_threshold(&self) -> usize
default fn strassen_threshold(&self) -> usize
StrassenAlgorithm will use the Strassen algorithm. Read moreSource§impl<R> ZnRing for Rwhere
R: DelegateRingImplFiniteRing + PrincipalIdealRing + CanHomFrom<<<R as DelegateRing>::Base as ZnRing>::IntegerRingBase> + ?Sized,
<R as DelegateRing>::Base: ZnRing,
impl<R> ZnRing for Rwhere
R: DelegateRingImplFiniteRing + PrincipalIdealRing + CanHomFrom<<<R as DelegateRing>::Base as ZnRing>::IntegerRingBase> + ?Sized,
<R as DelegateRing>::Base: ZnRing,
Source§type IntegerRingBase = <<R as DelegateRing>::Base as ZnRing>::IntegerRingBase
type IntegerRingBase = <<R as DelegateRing>::Base as ZnRing>::IntegerRingBase
Integers: IntegerRingStore
or Integers: RingStore<Type: IntegerRing>type IntegerRing = <<R as DelegateRing>::Base as ZnRing>::IntegerRing
default fn integer_ring(&self) -> &<R as ZnRing>::IntegerRing
default fn modulus( &self, ) -> &<<<R as ZnRing>::IntegerRing as RingStore>::Type as RingBase>::Element
Source§default fn smallest_positive_lift(
&self,
el: <R as RingBase>::Element,
) -> <<<R as ZnRing>::IntegerRing as RingStore>::Type as RingBase>::Element
default fn smallest_positive_lift( &self, el: <R as RingBase>::Element, ) -> <<<R as ZnRing>::IntegerRing as RingStore>::Type as RingBase>::Element
x in Z/nZ, i.e. the smallest positive integer m such that
m = x mod n. Read moreSource§default fn smallest_lift(
&self,
el: <R as RingBase>::Element,
) -> <<<R as ZnRing>::IntegerRing as RingStore>::Type as RingBase>::Element
default fn smallest_lift( &self, el: <R as RingBase>::Element, ) -> <<<R as ZnRing>::IntegerRing as RingStore>::Type as RingBase>::Element
x in Z/nZ, i.e. the smallest integer m such that
m = x mod n. Read moreSource§default fn from_int_promise_reduced(
&self,
x: <<<R as ZnRing>::IntegerRing as RingStore>::Type as RingBase>::Element,
) -> <R as RingBase>::Element
default fn from_int_promise_reduced( &self, x: <<<R as ZnRing>::IntegerRing as RingStore>::Type as RingBase>::Element, ) -> <R as RingBase>::Element
{ 0, ..., n - 1 }, returns the corresponding
element in Z/nZ. Any other input is considered a logic error. Read more