pub struct AsFieldBase<R: RingStore>where
R::Type: DivisibilityRing,{ /* private fields */ }Expand description
A wrapper around a ring that marks this ring to be a perfect field. In particular,
the functions provided by DivisibilityRing will be used to provide
field-like division for the wrapped ring.
§Example
A common case where you might encounter AsFieldBase is when working with rings
which might or might not be a field depending on data only known at runtime. One
example are implementations of ZnRing with modulus chosen at runtime.
// 7 is a prime, so this is a field - but must be checked at runtime
let Fp_as_ring = Zn::new(7);
// we use `ZnRing::as_field()` to make this a field
let Fp_as_field: AsField<Zn> = Fp_as_ring.as_field().ok().unwrap();
// in many cases (like here) we can use canonical isomorphisms to map elements
let iso = Fp_as_field.can_iso(&Fp_as_ring).unwrap();
assert_el_eq!(&Fp_as_ring, Fp_as_ring.one(), iso.map(Fp_as_field.one()));Since the canonical isomorphisms are not given by blanket implementations
(unfortunately there are some conflicts…), they are often not available in
generic contexts. In this case, the currently best solution is to directly
use the functions given by DelegateRing, e.g.
fn work_in_Fp<R>(ring: R)
where R: RingStore,
R::Type: ZnRing
{
use crate::feanor_math::delegate::DelegateRing;
let R_as_field = (&ring).as_field().ok().unwrap();
let x = ring.one();
// since `DelegateRing` does not have a corresponding `RingStore`, the access
// through `get_ring()` is necessary
let x_mapped = R_as_field.get_ring().rev_delegate(x);
let x_mapped_back = R_as_field.get_ring().delegate(x_mapped);
}Implementations§
Source§impl<R: RingStore> AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R: RingStore> AsFieldBase<R>where
R::Type: DivisibilityRing,
Sourcepub fn promise_is_perfect_field(base: R) -> Self
pub fn promise_is_perfect_field(base: R) -> Self
Assumes that the given ring is a perfect field, and wraps it in AsFieldBase.
This function is not really unsafe, but users should be careful to only use it with rings that are perfect fields. This cannot be checked in here, so must be checked by the caller.
Sourcepub fn promise_is_field(base: R) -> Result<Self, R>where
R::Type: FiniteRingSpecializable,
Available on crate feature unstable-enable only.
pub fn promise_is_field(base: R) -> Result<Self, R>where
R::Type: FiniteRingSpecializable,
unstable-enable only.Assumes that the given ring is a field and checks whether it is perfect. If this is the case,
the function wraps it in AsFieldBase.
This function is not really unsafe, but users should be careful to only use it with rings that are fields. This cannot be checked in here, so must be checked by the caller.
Note that this function does check that the passed field is perfect. However,
that check is too conservative, and might fail on some perfect fields.
If you are sure that the field is also perfect, consider using AsFieldBase::promise_is_perfect_field()
instead.
§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.
pub fn unwrap_element(&self, el: <Self as RingBase>::Element) -> El<R>
Sourcepub fn unwrap_self(self) -> R
pub fn unwrap_self(self) -> R
Removes the wrapper, returning the underlying base field.
Source§impl<R: RingStore> AsFieldBase<R>where
R::Type: PerfectField,
impl<R: RingStore> AsFieldBase<R>where
R::Type: PerfectField,
Sourcepub fn from_field(base: R) -> Self
pub fn from_field(base: R) -> Self
Creates a new AsFieldBase from a ring that is already known to be a
perfect field.
Trait Implementations§
Source§impl<AsFieldRingStore, R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<AsFieldBase<AsFieldRingStore>> for FreeAlgebraImplBase<R2, V2, A2, C2>where
AsFieldRingStore: 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<AsFieldRingStore, R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<AsFieldBase<AsFieldRingStore>> for FreeAlgebraImplBase<R2, V2, A2, C2>where
AsFieldRingStore: 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>,
Source§type Homomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Homomorphism
type Homomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Homomorphism
Source§fn has_canonical_hom(
&self,
from: &AsFieldBase<AsFieldRingStore>,
) -> Option<Self::Homomorphism>
fn has_canonical_hom( &self, from: &AsFieldBase<AsFieldRingStore>, ) -> 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: &AsFieldBase<AsFieldRingStore>,
el: FieldEl<AsFieldRingStore>,
hom: &Self::Homomorphism,
) -> <Self as RingBase>::Element
fn map_in( &self, from: &AsFieldBase<AsFieldRingStore>, el: FieldEl<AsFieldRingStore>, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
Source§fn map_in_ref(
&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
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<AsFieldRingStore> CanHomFrom<AsFieldBase<AsFieldRingStore>> for ZnBase
impl<AsFieldRingStore> CanHomFrom<AsFieldBase<AsFieldRingStore>> for ZnBase
Source§type Homomorphism = <ZnBase as CanHomFrom<ZnBase>>::Homomorphism
type Homomorphism = <ZnBase as CanHomFrom<ZnBase>>::Homomorphism
Source§fn has_canonical_hom(
&self,
from: &AsFieldBase<AsFieldRingStore>,
) -> Option<Self::Homomorphism>
fn has_canonical_hom( &self, from: &AsFieldBase<AsFieldRingStore>, ) -> 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: &AsFieldBase<AsFieldRingStore>,
el: FieldEl<AsFieldRingStore>,
hom: &Self::Homomorphism,
) -> <Self as RingBase>::Element
fn map_in( &self, from: &AsFieldBase<AsFieldRingStore>, el: FieldEl<AsFieldRingStore>, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
Source§fn map_in_ref(
&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
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<AsFieldRingStore, I, J> CanHomFrom<AsFieldBase<AsFieldRingStore>> for ZnBase<J>where
AsFieldRingStore: RingStore<Type = ZnBase<I>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
impl<AsFieldRingStore, I, J> CanHomFrom<AsFieldBase<AsFieldRingStore>> for ZnBase<J>where
AsFieldRingStore: RingStore<Type = ZnBase<I>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
Source§type Homomorphism = <ZnBase<J> as CanHomFrom<ZnBase<I>>>::Homomorphism
type Homomorphism = <ZnBase<J> as CanHomFrom<ZnBase<I>>>::Homomorphism
Source§fn has_canonical_hom(
&self,
from: &AsFieldBase<AsFieldRingStore>,
) -> Option<Self::Homomorphism>
fn has_canonical_hom( &self, from: &AsFieldBase<AsFieldRingStore>, ) -> 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: &AsFieldBase<AsFieldRingStore>,
el: FieldEl<AsFieldRingStore>,
hom: &Self::Homomorphism,
) -> <Self as RingBase>::Element
fn map_in( &self, from: &AsFieldBase<AsFieldRingStore>, el: FieldEl<AsFieldRingStore>, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
Source§fn map_in_ref(
&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
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<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,
Source§type Homomorphism = <<R2 as RingStore>::Type as CanHomFrom<<R1 as RingStore>::Type>>::Homomorphism
type Homomorphism = <<R2 as RingStore>::Type as CanHomFrom<<R1 as RingStore>::Type>>::Homomorphism
Source§fn has_canonical_hom(
&self,
from: &AsFieldBase<R1>,
) -> Option<Self::Homomorphism>
fn has_canonical_hom( &self, from: &AsFieldBase<R1>, ) -> 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: &AsFieldBase<R1>,
el: <AsFieldBase<R1> as RingBase>::Element,
hom: &Self::Homomorphism,
) -> Self::Element
fn map_in( &self, from: &AsFieldBase<R1>, el: <AsFieldBase<R1> as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element
Source§fn map_in_ref(
&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
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<R: RingStore, S: RingStore> CanHomFrom<AsFieldBase<S>> for AsFieldBase<R>
impl<R: RingStore, S: RingStore> CanHomFrom<AsFieldBase<S>> for AsFieldBase<R>
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: &AsFieldBase<S>) -> Option<Self::Homomorphism>
fn has_canonical_hom(&self, from: &AsFieldBase<S>) -> 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: &AsFieldBase<S>,
el: FieldEl<S>,
hom: &Self::Homomorphism,
) -> Self::Element
fn map_in( &self, from: &AsFieldBase<S>, el: FieldEl<S>, hom: &Self::Homomorphism, ) -> Self::Element
Source§fn map_in_ref(
&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
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<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,
Source§type Homomorphism = <<R2 as RingStore>::Type as CanHomFrom<<R1 as RingStore>::Type>>::Homomorphism
type Homomorphism = <<R2 as RingStore>::Type as CanHomFrom<<R1 as RingStore>::Type>>::Homomorphism
Source§fn has_canonical_hom(
&self,
from: &AsLocalPIRBase<R1>,
) -> Option<Self::Homomorphism>
fn has_canonical_hom( &self, from: &AsLocalPIRBase<R1>, ) -> 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: &AsLocalPIRBase<R1>,
el: <AsLocalPIRBase<R1> as RingBase>::Element,
hom: &Self::Homomorphism,
) -> Self::Element
fn map_in( &self, from: &AsLocalPIRBase<R1>, el: <AsLocalPIRBase<R1> as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element
Source§fn map_in_ref(
&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
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<AsFieldRingStore, R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>> for AsFieldBase<AsFieldRingStore>where
AsFieldRingStore: 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<AsFieldRingStore, R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>> for AsFieldBase<AsFieldRingStore>where
AsFieldRingStore: 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>,
Source§type Homomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Homomorphism
type Homomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Homomorphism
Source§fn has_canonical_hom(
&self,
from: &FreeAlgebraImplBase<R1, V1, A1, C1>,
) -> Option<Self::Homomorphism>
fn has_canonical_hom( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, ) -> 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: &FreeAlgebraImplBase<R1, V1, A1, C1>,
el: <FreeAlgebraImplBase<R1, V1, A1, C1> as RingBase>::Element,
hom: &Self::Homomorphism,
) -> <Self as RingBase>::Element
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
Source§fn map_in_ref(
&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
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<Impl, R, A, V, C> CanHomFrom<GaloisFieldBase<Impl>> for AsFieldBase<FreeAlgebraImpl<R, V, A, C>>where
Impl: RingStore,
Impl::Type: Field + FreeAlgebra + FiniteRing,
<<Impl::Type as RingExtension>::BaseRing as RingStore>::Type: ZnRing + Field,
R: RingStore,
R::Type: LinSolveRing,
V: VectorView<El<R>>,
C: ConvolutionAlgorithm<R::Type>,
A: Allocator + Clone,
FreeAlgebraImplBase<R, V, A, C>: CanHomFrom<Impl::Type>,
For the rationale which blanket implementations I chose, see the GaloisFieldBase.
impl<Impl, R, A, V, C> CanHomFrom<GaloisFieldBase<Impl>> for AsFieldBase<FreeAlgebraImpl<R, V, A, C>>where
Impl: RingStore,
Impl::Type: Field + FreeAlgebra + FiniteRing,
<<Impl::Type as RingExtension>::BaseRing as RingStore>::Type: ZnRing + Field,
R: RingStore,
R::Type: LinSolveRing,
V: VectorView<El<R>>,
C: ConvolutionAlgorithm<R::Type>,
A: Allocator + Clone,
FreeAlgebraImplBase<R, V, A, C>: CanHomFrom<Impl::Type>,
For the rationale which blanket implementations I chose, see the GaloisFieldBase.
Source§type Homomorphism = <FreeAlgebraImplBase<R, V, A, C> as CanHomFrom<<Impl as RingStore>::Type>>::Homomorphism
type Homomorphism = <FreeAlgebraImplBase<R, V, A, C> as CanHomFrom<<Impl as RingStore>::Type>>::Homomorphism
Source§fn has_canonical_hom(
&self,
from: &GaloisFieldBase<Impl>,
) -> Option<Self::Homomorphism>
fn has_canonical_hom( &self, from: &GaloisFieldBase<Impl>, ) -> 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: &GaloisFieldBase<Impl>,
el: <GaloisFieldBase<Impl> as RingBase>::Element,
hom: &Self::Homomorphism,
) -> Self::Element
fn map_in( &self, from: &GaloisFieldBase<Impl>, el: <GaloisFieldBase<Impl> as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element
Source§fn map_in_ref(
&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
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<R: RingStore, S: IntegerRing + ?Sized> CanHomFrom<S> for AsFieldBase<R>
Necessary to potentially implement crate::rings::zn::ZnRing.
impl<R: RingStore, S: IntegerRing + ?Sized> CanHomFrom<S> for AsFieldBase<R>
Necessary to potentially implement crate::rings::zn::ZnRing.
Source§type Homomorphism = <<R as RingStore>::Type as CanHomFrom<S>>::Homomorphism
type Homomorphism = <<R as RingStore>::Type as CanHomFrom<S>>::Homomorphism
Source§fn has_canonical_hom(&self, from: &S) -> Option<Self::Homomorphism>
fn has_canonical_hom(&self, from: &S) -> 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: &S,
el: S::Element,
hom: &Self::Homomorphism,
) -> Self::Element
fn map_in( &self, from: &S, el: S::Element, hom: &Self::Homomorphism, ) -> Self::Element
Source§fn map_in_ref(
&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
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<AsFieldRingStore, I, J> CanHomFrom<ZnBase<I>> for AsFieldBase<AsFieldRingStore>where
AsFieldRingStore: RingStore<Type = ZnBase<J>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
impl<AsFieldRingStore, I, J> CanHomFrom<ZnBase<I>> for AsFieldBase<AsFieldRingStore>where
AsFieldRingStore: RingStore<Type = ZnBase<J>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
Source§type Homomorphism = <ZnBase<J> as CanHomFrom<ZnBase<I>>>::Homomorphism
type Homomorphism = <ZnBase<J> as CanHomFrom<ZnBase<I>>>::Homomorphism
Source§fn has_canonical_hom(&self, from: &ZnBase<I>) -> Option<Self::Homomorphism>
fn has_canonical_hom(&self, from: &ZnBase<I>) -> 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: &ZnBase<I>,
el: <ZnBase<I> as RingBase>::Element,
hom: &Self::Homomorphism,
) -> <Self as RingBase>::Element
fn map_in( &self, from: &ZnBase<I>, el: <ZnBase<I> as RingBase>::Element, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
Source§fn map_in_ref(
&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
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<I> CanHomFrom<ZnBase<I>> for AsFieldBase<Zn>
impl<I> CanHomFrom<ZnBase<I>> for AsFieldBase<Zn>
Source§type Homomorphism = <ZnBase as CanHomFrom<ZnBase<I>>>::Homomorphism
type Homomorphism = <ZnBase as CanHomFrom<ZnBase<I>>>::Homomorphism
Source§fn has_canonical_hom(&self, from: &ZnBase<I>) -> Option<Self::Homomorphism>
fn has_canonical_hom(&self, from: &ZnBase<I>) -> 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: &ZnBase<I>,
el: <ZnBase<I> as RingBase>::Element,
hom: &Self::Homomorphism,
) -> Self::Element
fn map_in( &self, from: &ZnBase<I>, el: <ZnBase<I> as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element
Source§fn map_in_ref(
&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
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<AsFieldRingStore> CanHomFrom<ZnBase> for AsFieldBase<AsFieldRingStore>
impl<AsFieldRingStore> CanHomFrom<ZnBase> for AsFieldBase<AsFieldRingStore>
Source§type Homomorphism = <ZnBase as CanHomFrom<ZnBase>>::Homomorphism
type Homomorphism = <ZnBase as CanHomFrom<ZnBase>>::Homomorphism
Source§fn has_canonical_hom(&self, from: &ZnBase) -> Option<Self::Homomorphism>
fn has_canonical_hom(&self, from: &ZnBase) -> 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: &ZnBase,
el: <ZnBase as RingBase>::Element,
hom: &Self::Homomorphism,
) -> <Self as RingBase>::Element
fn map_in( &self, from: &ZnBase, el: <ZnBase as RingBase>::Element, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element
Source§fn map_in_ref(
&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
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<AsFieldRingStore, R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<AsFieldBase<AsFieldRingStore>> for FreeAlgebraImplBase<R2, V2, A2, C2>where
AsFieldRingStore: 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<AsFieldRingStore, R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<AsFieldBase<AsFieldRingStore>> for FreeAlgebraImplBase<R2, V2, A2, C2>where
AsFieldRingStore: 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>,
Source§type Isomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Isomorphism
type Isomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Isomorphism
Source§fn has_canonical_iso(
&self,
from: &AsFieldBase<AsFieldRingStore>,
) -> Option<Self::Isomorphism>
fn has_canonical_iso( &self, from: &AsFieldBase<AsFieldRingStore>, ) -> 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: &AsFieldBase<AsFieldRingStore>,
el: <Self as RingBase>::Element,
hom: &Self::Isomorphism,
) -> FieldEl<AsFieldRingStore>
fn map_out( &self, from: &AsFieldBase<AsFieldRingStore>, el: <Self as RingBase>::Element, hom: &Self::Isomorphism, ) -> FieldEl<AsFieldRingStore>
el under the canonical homomorphism from -> self.Source§impl<AsFieldRingStore> CanIsoFromTo<AsFieldBase<AsFieldRingStore>> for ZnBase
impl<AsFieldRingStore> CanIsoFromTo<AsFieldBase<AsFieldRingStore>> for ZnBase
Source§type Isomorphism = <ZnBase as CanIsoFromTo<ZnBase>>::Isomorphism
type Isomorphism = <ZnBase as CanIsoFromTo<ZnBase>>::Isomorphism
Source§fn has_canonical_iso(
&self,
from: &AsFieldBase<AsFieldRingStore>,
) -> Option<Self::Isomorphism>
fn has_canonical_iso( &self, from: &AsFieldBase<AsFieldRingStore>, ) -> 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: &AsFieldBase<AsFieldRingStore>,
el: <Self as RingBase>::Element,
hom: &Self::Isomorphism,
) -> FieldEl<AsFieldRingStore>
fn map_out( &self, from: &AsFieldBase<AsFieldRingStore>, el: <Self as RingBase>::Element, hom: &Self::Isomorphism, ) -> FieldEl<AsFieldRingStore>
el under the canonical homomorphism from -> self.Source§impl<AsFieldRingStore, I, J> CanIsoFromTo<AsFieldBase<AsFieldRingStore>> for ZnBase<J>where
AsFieldRingStore: RingStore<Type = ZnBase<I>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
impl<AsFieldRingStore, I, J> CanIsoFromTo<AsFieldBase<AsFieldRingStore>> for ZnBase<J>where
AsFieldRingStore: RingStore<Type = ZnBase<I>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
Source§type Isomorphism = <ZnBase<J> as CanIsoFromTo<ZnBase<I>>>::Isomorphism
type Isomorphism = <ZnBase<J> as CanIsoFromTo<ZnBase<I>>>::Isomorphism
Source§fn has_canonical_iso(
&self,
from: &AsFieldBase<AsFieldRingStore>,
) -> Option<Self::Isomorphism>
fn has_canonical_iso( &self, from: &AsFieldBase<AsFieldRingStore>, ) -> 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: &AsFieldBase<AsFieldRingStore>,
el: <Self as RingBase>::Element,
hom: &Self::Isomorphism,
) -> FieldEl<AsFieldRingStore>
fn map_out( &self, from: &AsFieldBase<AsFieldRingStore>, el: <Self as RingBase>::Element, hom: &Self::Isomorphism, ) -> FieldEl<AsFieldRingStore>
el under the canonical homomorphism from -> self.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,
Source§type Isomorphism = <<R2 as RingStore>::Type as CanIsoFromTo<<R1 as RingStore>::Type>>::Isomorphism
type Isomorphism = <<R2 as RingStore>::Type as CanIsoFromTo<<R1 as RingStore>::Type>>::Isomorphism
Source§fn has_canonical_iso(&self, from: &AsFieldBase<R1>) -> Option<Self::Isomorphism>
fn has_canonical_iso(&self, from: &AsFieldBase<R1>) -> 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: &AsFieldBase<R1>,
el: Self::Element,
iso: &Self::Isomorphism,
) -> <AsFieldBase<R1> as RingBase>::Element
fn map_out( &self, from: &AsFieldBase<R1>, el: Self::Element, iso: &Self::Isomorphism, ) -> <AsFieldBase<R1> as RingBase>::Element
el under the canonical homomorphism from -> self.Source§impl<R: RingStore, S: RingStore> CanIsoFromTo<AsFieldBase<S>> for AsFieldBase<R>
impl<R: RingStore, S: RingStore> CanIsoFromTo<AsFieldBase<S>> for AsFieldBase<R>
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: &AsFieldBase<S>) -> Option<Self::Isomorphism>
fn has_canonical_iso(&self, from: &AsFieldBase<S>) -> 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: &AsFieldBase<S>,
el: Self::Element,
iso: &Self::Isomorphism,
) -> FieldEl<S>
fn map_out( &self, from: &AsFieldBase<S>, el: Self::Element, iso: &Self::Isomorphism, ) -> FieldEl<S>
el under the canonical homomorphism from -> self.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,
Source§type Isomorphism = <<R2 as RingStore>::Type as CanIsoFromTo<<R1 as RingStore>::Type>>::Isomorphism
type Isomorphism = <<R2 as RingStore>::Type as CanIsoFromTo<<R1 as RingStore>::Type>>::Isomorphism
Source§fn has_canonical_iso(
&self,
from: &AsLocalPIRBase<R1>,
) -> Option<Self::Isomorphism>
fn has_canonical_iso( &self, from: &AsLocalPIRBase<R1>, ) -> 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: &AsLocalPIRBase<R1>,
el: Self::Element,
iso: &Self::Isomorphism,
) -> <AsLocalPIRBase<R1> as RingBase>::Element
fn map_out( &self, from: &AsLocalPIRBase<R1>, el: Self::Element, iso: &Self::Isomorphism, ) -> <AsLocalPIRBase<R1> as RingBase>::Element
el under the canonical homomorphism from -> self.Source§impl<AsFieldRingStore, R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>> for AsFieldBase<AsFieldRingStore>where
AsFieldRingStore: 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<AsFieldRingStore, R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>> for AsFieldBase<AsFieldRingStore>where
AsFieldRingStore: 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>,
Source§type Isomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Isomorphism
type Isomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Isomorphism
Source§fn has_canonical_iso(
&self,
from: &FreeAlgebraImplBase<R1, V1, A1, C1>,
) -> Option<Self::Isomorphism>
fn has_canonical_iso( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, ) -> 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: &FreeAlgebraImplBase<R1, V1, A1, C1>,
el: <Self as RingBase>::Element,
iso: &Self::Isomorphism,
) -> <FreeAlgebraImplBase<R1, V1, A1, C1> as RingBase>::Element
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
el under the canonical homomorphism from -> self.Source§impl<Impl, R, A, V, C> CanIsoFromTo<GaloisFieldBase<Impl>> for AsFieldBase<FreeAlgebraImpl<R, V, A, C>>where
Impl: RingStore,
Impl::Type: Field + FreeAlgebra + FiniteRing,
<<Impl::Type as RingExtension>::BaseRing as RingStore>::Type: ZnRing + Field,
R: RingStore,
R::Type: LinSolveRing,
V: VectorView<El<R>>,
C: ConvolutionAlgorithm<R::Type>,
A: Allocator + Clone,
FreeAlgebraImplBase<R, V, A, C>: CanIsoFromTo<Impl::Type>,
For the rationale which blanket implementations I chose, see the GaloisFieldBase.
impl<Impl, R, A, V, C> CanIsoFromTo<GaloisFieldBase<Impl>> for AsFieldBase<FreeAlgebraImpl<R, V, A, C>>where
Impl: RingStore,
Impl::Type: Field + FreeAlgebra + FiniteRing,
<<Impl::Type as RingExtension>::BaseRing as RingStore>::Type: ZnRing + Field,
R: RingStore,
R::Type: LinSolveRing,
V: VectorView<El<R>>,
C: ConvolutionAlgorithm<R::Type>,
A: Allocator + Clone,
FreeAlgebraImplBase<R, V, A, C>: CanIsoFromTo<Impl::Type>,
For the rationale which blanket implementations I chose, see the GaloisFieldBase.
Source§type Isomorphism = <FreeAlgebraImplBase<R, V, A, C> as CanIsoFromTo<<Impl as RingStore>::Type>>::Isomorphism
type Isomorphism = <FreeAlgebraImplBase<R, V, A, C> as CanIsoFromTo<<Impl as RingStore>::Type>>::Isomorphism
Source§fn has_canonical_iso(
&self,
from: &GaloisFieldBase<Impl>,
) -> Option<Self::Isomorphism>
fn has_canonical_iso( &self, from: &GaloisFieldBase<Impl>, ) -> 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: &GaloisFieldBase<Impl>,
el: Self::Element,
iso: &Self::Isomorphism,
) -> <GaloisFieldBase<Impl> as RingBase>::Element
fn map_out( &self, from: &GaloisFieldBase<Impl>, el: Self::Element, iso: &Self::Isomorphism, ) -> <GaloisFieldBase<Impl> as RingBase>::Element
el under the canonical homomorphism from -> self.Source§impl<AsFieldRingStore, I, J> CanIsoFromTo<ZnBase<I>> for AsFieldBase<AsFieldRingStore>where
AsFieldRingStore: RingStore<Type = ZnBase<J>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
impl<AsFieldRingStore, I, J> CanIsoFromTo<ZnBase<I>> for AsFieldBase<AsFieldRingStore>where
AsFieldRingStore: RingStore<Type = ZnBase<J>>,
I: RingStore,
I::Type: IntegerRing,
J: RingStore,
J::Type: IntegerRing,
Source§type Isomorphism = <ZnBase<J> as CanIsoFromTo<ZnBase<I>>>::Isomorphism
type Isomorphism = <ZnBase<J> as CanIsoFromTo<ZnBase<I>>>::Isomorphism
Source§fn has_canonical_iso(&self, from: &ZnBase<I>) -> Option<Self::Isomorphism>
fn has_canonical_iso(&self, from: &ZnBase<I>) -> 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§impl<I> CanIsoFromTo<ZnBase<I>> for AsFieldBase<Zn>
impl<I> CanIsoFromTo<ZnBase<I>> for AsFieldBase<Zn>
Source§type Isomorphism = <ZnBase as CanIsoFromTo<ZnBase<I>>>::Isomorphism
type Isomorphism = <ZnBase as CanIsoFromTo<ZnBase<I>>>::Isomorphism
Source§fn has_canonical_iso(&self, from: &ZnBase<I>) -> Option<Self::Isomorphism>
fn has_canonical_iso(&self, from: &ZnBase<I>) -> 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§impl<AsFieldRingStore> CanIsoFromTo<ZnBase> for AsFieldBase<AsFieldRingStore>
impl<AsFieldRingStore> CanIsoFromTo<ZnBase> for AsFieldBase<AsFieldRingStore>
Source§type Isomorphism = <ZnBase as CanIsoFromTo<ZnBase>>::Isomorphism
type Isomorphism = <ZnBase as CanIsoFromTo<ZnBase>>::Isomorphism
Source§fn has_canonical_iso(&self, from: &ZnBase) -> Option<Self::Isomorphism>
fn has_canonical_iso(&self, from: &ZnBase) -> 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§impl<R> Clone for AsFieldBase<R>
impl<R> Clone for AsFieldBase<R>
Source§impl<R: RingStore> ComputeInnerProduct for AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R: RingStore> ComputeInnerProduct for AsFieldBase<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
unstable-enable only.sum_i lhs[i] * rhs[i].Source§impl<R> Debug for AsFieldBase<R>
impl<R> Debug for AsFieldBase<R>
Source§impl<R: RingStore> DelegateRing for AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R: RingStore> DelegateRing for AsFieldBase<R>where
R::Type: DivisibilityRing,
Source§type Element = FieldEl<R>
type Element = FieldEl<R>
Source§fn get_delegate(&self) -> &Self::Base
fn get_delegate(&self) -> &Self::Base
Source§fn delegate(&self, el: Self::Element) -> <Self::Base as RingBase>::Element
fn delegate(&self, el: Self::Element) -> <Self::Base as RingBase>::Element
Source§fn delegate_mut<'a>(
&self,
el: &'a mut Self::Element,
) -> &'a mut <Self::Base as RingBase>::Element
fn delegate_mut<'a>( &self, el: &'a mut Self::Element, ) -> &'a mut <Self::Base as RingBase>::Element
Source§fn delegate_ref<'a>(
&self,
el: &'a Self::Element,
) -> &'a <Self::Base as RingBase>::Element
fn delegate_ref<'a>( &self, el: &'a Self::Element, ) -> &'a <Self::Base as RingBase>::Element
Source§fn rev_delegate(&self, el: <Self::Base as RingBase>::Element) -> Self::Element
fn rev_delegate(&self, el: <Self::Base as RingBase>::Element) -> Self::Element
Source§fn postprocess_delegate_mut(&self, el: &mut Self::Element)
fn postprocess_delegate_mut(&self, el: &mut Self::Element)
DelegateRing::delegate_mut()). Read moreSource§fn element_cast(&self, el: Self::Element) -> <Self as RingBase>::Element
fn element_cast(&self, el: Self::Element) -> <Self as RingBase>::Element
Source§fn rev_element_cast(&self, el: <Self as RingBase>::Element) -> Self::Element
fn rev_element_cast(&self, el: <Self as RingBase>::Element) -> Self::Element
Source§impl<'de, R> Deserialize<'de> for AsFieldBase<R>
impl<'de, R> Deserialize<'de> for AsFieldBase<R>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl<R: RingStore> EuclideanRing for AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R: RingStore> EuclideanRing for AsFieldBase<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: RingStore> Field for AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R: RingStore> Field for AsFieldBase<R>where
R::Type: DivisibilityRing,
Source§impl<R> FromModulusCreateableZnRing for AsFieldBase<RingValue<R>>
impl<R> FromModulusCreateableZnRing for AsFieldBase<RingValue<R>>
Source§fn from_modulus<F, E>(create_modulus: F) -> Result<Self, E>
fn from_modulus<F, E>(create_modulus: F) -> Result<Self, E>
unstable-enable only.Source§impl<R> InterpolationBaseRing for AsFieldBase<R>
impl<R> InterpolationBaseRing for AsFieldBase<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
unstable-enable only.Source§type ExtendedRing<'a> = <<R as RingStore>::Type as InterpolationBaseRing>::ExtendedRing<'a>
where
Self: 'a
type ExtendedRing<'a> = <<R as RingStore>::Type as InterpolationBaseRing>::ExtendedRing<'a> where Self: 'a
unstable-enable only.Source§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_base<'a, S>(&self, ext_ring: S, el: El<S>) -> Option<Self::Element>where
Self: 'a,
S: RingStore<Type = Self::ExtendedRingBase<'a>>,
unstable-enable only.Source§fn in_extension<'a, S>(&self, ext_ring: S, el: Self::Element) -> El<S>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>>,
unstable-enable only.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>>>)
unstable-enable only.count points such that the difference between any two of them
is a non-zero-divisor. Read moreSource§impl<I: RingStore> InterpolationBaseRing for AsFieldBase<Zn<I>>where
I::Type: IntegerRing,
impl<I: RingStore> InterpolationBaseRing for AsFieldBase<Zn<I>>where
I::Type: IntegerRing,
Source§type ExtendedRingBase<'a> = GaloisFieldBase<RingValue<AsFieldBase<RingValue<FreeAlgebraImplBase<RingRef<'a, AsFieldBase<RingValue<ZnBase<I>>>>, SparseMapVector<RingRef<'a, AsFieldBase<RingValue<ZnBase<I>>>>>>>>>>
where
Self: 'a
type ExtendedRingBase<'a> = GaloisFieldBase<RingValue<AsFieldBase<RingValue<FreeAlgebraImplBase<RingRef<'a, AsFieldBase<RingValue<ZnBase<I>>>>, SparseMapVector<RingRef<'a, AsFieldBase<RingValue<ZnBase<I>>>>>>>>>> where Self: 'a
unstable-enable only.Source§type ExtendedRing<'a> = RingValue<GaloisFieldBase<RingValue<AsFieldBase<RingValue<FreeAlgebraImplBase<RingRef<'a, AsFieldBase<RingValue<ZnBase<I>>>>, SparseMapVector<RingRef<'a, AsFieldBase<RingValue<ZnBase<I>>>>>>>>>>>
where
Self: 'a
type ExtendedRing<'a> = RingValue<GaloisFieldBase<RingValue<AsFieldBase<RingValue<FreeAlgebraImplBase<RingRef<'a, AsFieldBase<RingValue<ZnBase<I>>>>, SparseMapVector<RingRef<'a, AsFieldBase<RingValue<ZnBase<I>>>>>>>>>>> where Self: 'a
unstable-enable only.Source§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_base<'a, S>(&self, ext_ring: S, el: El<S>) -> Option<Self::Element>where
Self: 'a,
S: RingStore<Type = Self::ExtendedRingBase<'a>>,
unstable-enable only.Source§fn in_extension<'a, S>(&self, ext_ring: S, el: Self::Element) -> El<S>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>>,
unstable-enable only.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>>>)
unstable-enable only.count points such that the difference between any two of them
is a non-zero-divisor. Read moreSource§impl InterpolationBaseRing for AsFieldBase<Zn>
impl InterpolationBaseRing for AsFieldBase<Zn>
Source§type ExtendedRingBase<'a> = GaloisFieldBase<RingValue<AsFieldBase<RingValue<FreeAlgebraImplBase<RingRef<'a, AsFieldBase<RingValue<ZnBase>>>, SparseMapVector<RingRef<'a, AsFieldBase<RingValue<ZnBase>>>>>>>>>
where
Self: 'a
type ExtendedRingBase<'a> = GaloisFieldBase<RingValue<AsFieldBase<RingValue<FreeAlgebraImplBase<RingRef<'a, AsFieldBase<RingValue<ZnBase>>>, SparseMapVector<RingRef<'a, AsFieldBase<RingValue<ZnBase>>>>>>>>> where Self: 'a
unstable-enable only.Source§type ExtendedRing<'a> = RingValue<GaloisFieldBase<RingValue<AsFieldBase<RingValue<FreeAlgebraImplBase<RingRef<'a, AsFieldBase<RingValue<ZnBase>>>, SparseMapVector<RingRef<'a, AsFieldBase<RingValue<ZnBase>>>>>>>>>>
where
Self: 'a
type ExtendedRing<'a> = RingValue<GaloisFieldBase<RingValue<AsFieldBase<RingValue<FreeAlgebraImplBase<RingRef<'a, AsFieldBase<RingValue<ZnBase>>>, SparseMapVector<RingRef<'a, AsFieldBase<RingValue<ZnBase>>>>>>>>>> where Self: 'a
unstable-enable only.Source§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_base<'a, S>(&self, ext_ring: S, el: El<S>) -> Option<Self::Element>where
Self: 'a,
S: RingStore<Type = Self::ExtendedRingBase<'a>>,
unstable-enable only.Source§fn in_extension<'a, S>(&self, ext_ring: S, el: Self::Element) -> El<S>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>>,
unstable-enable only.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>>>)
unstable-enable only.count points such that the difference between any two of them
is a non-zero-divisor. Read moreSource§impl<R: RingStore> KaratsubaHint for AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R: RingStore> KaratsubaHint for AsFieldBase<R>where
R::Type: DivisibilityRing,
Source§fn karatsuba_threshold(&self) -> usize
fn karatsuba_threshold(&self) -> usize
unstable-enable only.KaratsubaAlgorithm will use the Karatsuba algorithm. Read moreSource§impl<R> PartialEq for AsFieldBase<R>
impl<R> PartialEq for AsFieldBase<R>
Source§impl<R: RingStore> PrincipalIdealRing for AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R: RingStore> PrincipalIdealRing for AsFieldBase<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 annihilator(&self, val: &Self::Element) -> Self::Element
fn annihilator(&self, val: &Self::Element) -> Self::Element
Source§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 ideal_gen(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
fn ideal_gen(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
g of the ideal (lhs, rhs) = (g), also known as greatest
common divisor. Read moreSource§fn ideal_gen_with_controller<Controller>(
&self,
lhs: &Self::Element,
rhs: &Self::Element,
_: Controller,
) -> Self::Elementwhere
Controller: ComputationController,
fn ideal_gen_with_controller<Controller>(
&self,
lhs: &Self::Element,
rhs: &Self::Element,
_: Controller,
) -> Self::Elementwhere
Controller: ComputationController,
PrincipalIdealRing::ideal_gen(), this computes a generator of the ideal (lhs, rhs).
However, it additionally accepts a ComputationController to customize the performed
computation.Source§impl<R: RingStore> PrincipalLocalRing for AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R: RingStore> PrincipalLocalRing for AsFieldBase<R>where
R::Type: DivisibilityRing,
Source§fn max_ideal_gen(&self) -> &Self::Element
fn max_ideal_gen(&self) -> &Self::Element
unstable-enable only.Source§fn nilpotent_power(&self) -> Option<usize>
fn nilpotent_power(&self) -> Option<usize>
unstable-enable only.e such that p^e = 0 where p is
the generator of the maximal ideal.Source§impl<R> Serialize for AsFieldBase<R>
impl<R> Serialize for AsFieldBase<R>
Source§impl<R: RingStore> StrassenHint for AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R: RingStore> StrassenHint for AsFieldBase<R>where
R::Type: DivisibilityRing,
Source§fn strassen_threshold(&self) -> usize
fn strassen_threshold(&self) -> usize
unstable-enable only.StrassenAlgorithm will use the Strassen algorithm. Read moreimpl<R> Copy for AsFieldBase<R>
impl<R: RingStore> DelegateRingImplFiniteRing for AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R: RingStore> Domain for AsFieldBase<R>where
R::Type: DivisibilityRing,
impl<R> PerfectField for AsFieldBase<R>
Auto Trait Implementations§
impl<R> Freeze for AsFieldBase<R>
impl<R> RefUnwindSafe for AsFieldBase<R>
impl<R> Send for AsFieldBase<R>
impl<R> Sync for AsFieldBase<R>
impl<R> Unpin for AsFieldBase<R>
impl<R> UnwindSafe for AsFieldBase<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> ComputeFrobeniusRing for R
impl<R> ComputeFrobeniusRing for R
Source§type FrobeniusData = UnsafeAnyFrobeniusDataGuarded<R>
type FrobeniusData = UnsafeAnyFrobeniusDataGuarded<R>
unstable-enable only.Source§default fn create_frobenius(
&self,
exponent_of_p: usize,
) -> (<R as ComputeFrobeniusRing>::FrobeniusData, usize)
default fn create_frobenius( &self, exponent_of_p: usize, ) -> (<R as ComputeFrobeniusRing>::FrobeniusData, usize)
unstable-enable only.Source§default fn apply_frobenius(
&self,
_frobenius_data: &<R as ComputeFrobeniusRing>::FrobeniusData,
exponent_of_p: usize,
x: <R as RingBase>::Element,
) -> <R as RingBase>::Element
default fn apply_frobenius( &self, _frobenius_data: &<R as ComputeFrobeniusRing>::FrobeniusData, exponent_of_p: usize, x: <R as RingBase>::Element, ) -> <R as RingBase>::Element
unstable-enable only.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> ComputeResultantRing for R
impl<R> ComputeResultantRing for R
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<R> DivisibilityRing for R
impl<R> DivisibilityRing for R
Source§type PreparedDivisorData = <<R as DelegateRing>::Base as DivisibilityRing>::PreparedDivisorData
type PreparedDivisorData = <<R as DelegateRing>::Base as DivisibilityRing>::PreparedDivisorData
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,
) -> <R as DivisibilityRing>::PreparedDivisorData
fn prepare_divisor( &self, x: &<R as RingBase>::Element, ) -> <R as DivisibilityRing>::PreparedDivisorData
Source§default fn checked_left_div_prepared(
&self,
lhs: &<R as RingBase>::Element,
rhs: &<R as RingBase>::Element,
rhs_prep: &<R as DivisibilityRing>::PreparedDivisorData,
) -> Option<<R as RingBase>::Element>
default fn checked_left_div_prepared( &self, lhs: &<R as RingBase>::Element, rhs: &<R as RingBase>::Element, rhs_prep: &<R as DivisibilityRing>::PreparedDivisorData, ) -> 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: &<R as RingBase>::Element,
rhs_prep: &<R as DivisibilityRing>::PreparedDivisorData,
) -> bool
default fn divides_left_prepared( &self, lhs: &<R as RingBase>::Element, rhs: &<R as RingBase>::Element, rhs_prep: &<R as DivisibilityRing>::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 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> EvalPolyLocallyRing for R
impl<R> EvalPolyLocallyRing for R
Source§type LocalComputationData<'ring> = RingRef<'ring, R>
where
R: 'ring
type LocalComputationData<'ring> = RingRef<'ring, R> where R: 'ring
unstable-enable only.Source§type LocalRing<'ring> = RingRef<'ring, R>
where
R: 'ring
type LocalRing<'ring> = RingRef<'ring, R> where R: 'ring
unstable-enable only.Source§type LocalRingBase<'ring> = R
where
R: 'ring
type LocalRingBase<'ring> = R where R: 'ring
unstable-enable only.Source§fn ln_pseudo_norm(&self, _el: &<R as RingBase>::Element) -> f64
fn ln_pseudo_norm(&self, _el: &<R as RingBase>::Element) -> f64
unstable-enable only.Source§fn local_computation<'ring>(
&'ring self,
_ln_pseudo_norm_bound: f64,
) -> <R as EvalPolyLocallyRing>::LocalComputationData<'ring>
fn local_computation<'ring>( &'ring self, _ln_pseudo_norm_bound: f64, ) -> <R as EvalPolyLocallyRing>::LocalComputationData<'ring>
unstable-enable only.Source§fn local_ring_at<'ring>(
&self,
computation: &<R as EvalPolyLocallyRing>::LocalComputationData<'ring>,
_i: usize,
) -> <R as EvalPolyLocallyRing>::LocalRing<'ring>where
R: 'ring,
fn local_ring_at<'ring>(
&self,
computation: &<R as EvalPolyLocallyRing>::LocalComputationData<'ring>,
_i: usize,
) -> <R as EvalPolyLocallyRing>::LocalRing<'ring>where
R: 'ring,
unstable-enable only.i-th local ring belonging to the given computation.Source§fn local_ring_count<'ring>(
&self,
_computation: &<R as EvalPolyLocallyRing>::LocalComputationData<'ring>,
) -> usizewhere
R: 'ring,
fn local_ring_count<'ring>(
&self,
_computation: &<R as EvalPolyLocallyRing>::LocalComputationData<'ring>,
) -> usizewhere
R: 'ring,
unstable-enable only.k of local rings that are required
to get the correct result of the given computation.Source§fn reduce<'ring>(
&self,
_computation: &<R as EvalPolyLocallyRing>::LocalComputationData<'ring>,
el: &<R as RingBase>::Element,
) -> Vec<<<R as EvalPolyLocallyRing>::LocalRingBase<'ring> as RingBase>::Element>where
R: 'ring,
fn reduce<'ring>(
&self,
_computation: &<R as EvalPolyLocallyRing>::LocalComputationData<'ring>,
el: &<R as RingBase>::Element,
) -> Vec<<<R as EvalPolyLocallyRing>::LocalRingBase<'ring> as RingBase>::Element>where
R: 'ring,
unstable-enable only.R -> R1 x ... x Rk, i.e. maps the given element into each of
the local rings.Source§fn lift_combine<'ring>(
&self,
_computation: &<R as EvalPolyLocallyRing>::LocalComputationData<'ring>,
el: &[<<R as EvalPolyLocallyRing>::LocalRingBase<'ring> as RingBase>::Element],
) -> <R as RingBase>::Elementwhere
R: 'ring,
fn lift_combine<'ring>(
&self,
_computation: &<R as EvalPolyLocallyRing>::LocalComputationData<'ring>,
el: &[<<R as EvalPolyLocallyRing>::LocalRingBase<'ring> as RingBase>::Element],
) -> <R as RingBase>::Elementwhere
R: 'ring,
unstable-enable only.R -> R1 x ... x Rk, i.e. a ring element x that reduces
to each of the given local rings under the map EvalPolyLocallyRing::reduce(). 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)
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)
Source§fn factor_poly_with_controller<P, Controller>(
poly_ring: P,
poly: &<<P as RingStore>::Type as RingBase>::Element,
controller: Controller,
) -> (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>,
Controller: ComputationController,
fn factor_poly_with_controller<P, Controller>(
poly_ring: P,
poly: &<<P as RingStore>::Type as RingBase>::Element,
controller: Controller,
) -> (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>,
Controller: ComputationController,
FactorPolyField::factor_poly(), this computes the factorization of
a polynomial. However, it additionally accepts a ComputationController
to customize the performed computation.Source§impl<R> FiniteRing for R
impl<R> FiniteRing for R
Source§type ElementsIter<'a> = DelegateFiniteRingElementsIter<'a, R>
where
R: 'a
type ElementsIter<'a> = DelegateFiniteRingElementsIter<'a, R> where R: 'a
FiniteRing::elements(), which should
iterate over all elements of the ring.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
Source§fn specialize<O>(op: O) -> <O as FiniteRingOperation<R>>::Outputwhere
O: FiniteRingOperation<R>,
fn specialize<O>(op: O) -> <O as FiniteRingOperation<R>>::Outputwhere
O: FiniteRingOperation<R>,
unstable-enable only.Source§fn is_finite_ring() -> bool
fn is_finite_ring() -> bool
unstable-enable only.Source§impl<R> FreeAlgebra for R
impl<R> FreeAlgebra for R
Source§type VectorRepresentation<'a> = <<R as DelegateRing>::Base as FreeAlgebra>::VectorRepresentation<'a>
where
R: 'a
type VectorRepresentation<'a> = <<R as DelegateRing>::Base as FreeAlgebra>::VectorRepresentation<'a> where R: 'a
FreeAlgebra::wrt_canonical_basis().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§default fn mul_assign_gen_power(
&self,
el: &mut <R as RingBase>::Element,
power: usize,
)
default fn mul_assign_gen_power( &self, el: &mut <R as RingBase>::Element, power: usize, )
power-th power of the canonical generator
of this ring, as given by FreeAlgebra::canonical_gen().Source§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.Source§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>,
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 minpoly<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>,
fn minpoly<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
unstable-enable only.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
unstable-enable only.Source§type LocalRing<'ring> = RingRef<'ring, R>
where
R: 'ring
type LocalRing<'ring> = RingRef<'ring, R> where R: 'ring
unstable-enable only.Source§type LocalFieldBase<'ring> = R
where
R: 'ring
type LocalFieldBase<'ring> = R where R: 'ring
unstable-enable only.Source§type LocalField<'ring> = RingRef<'ring, R>
where
R: 'ring
type LocalField<'ring> = RingRef<'ring, R> where R: 'ring
unstable-enable only.Source§type SuitableIdeal<'ring> = RingRef<'ring, R>
where
R: 'ring
type SuitableIdeal<'ring> = RingRef<'ring, R> where R: 'ring
unstable-enable only.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
unstable-enable only.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 performanceSource§fn maximal_ideal_factor_count<'ring>(
&self,
ideal: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
) -> usizewhere
R: 'ring,
fn maximal_ideal_factor_count<'ring>(
&self,
ideal: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
) -> usizewhere
R: 'ring,
unstable-enable only.ideal.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>
unstable-enable only.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,
unstable-enable only.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,
unstable-enable only.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>::LocalRingBase<'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>::LocalRingBase<'ring>, usize),
max_ideal_idx: usize,
x: <R as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
unstable-enable only.Source§fn base_ring_to_field<'ring>(
&self,
_ideal: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: &<R as PolyGCDLocallyDomain>::LocalRingBase<'ring>,
to: &<R as PolyGCDLocallyDomain>::LocalFieldBase<'ring>,
max_ideal_idx: usize,
x: <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalField<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
fn base_ring_to_field<'ring>(
&self,
_ideal: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: &<R as PolyGCDLocallyDomain>::LocalRingBase<'ring>,
to: &<R as PolyGCDLocallyDomain>::LocalFieldBase<'ring>,
max_ideal_idx: usize,
x: <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalField<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
unstable-enable only.R / miSource§fn field_to_base_ring<'ring>(
&self,
_ideal: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: &<R as PolyGCDLocallyDomain>::LocalFieldBase<'ring>,
to: &<R as PolyGCDLocallyDomain>::LocalRingBase<'ring>,
max_ideal_idx: usize,
x: <<<R as PolyGCDLocallyDomain>::LocalField<'ring> as RingStore>::Type as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
fn field_to_base_ring<'ring>(
&self,
_ideal: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: &<R as PolyGCDLocallyDomain>::LocalFieldBase<'ring>,
to: &<R as PolyGCDLocallyDomain>::LocalRingBase<'ring>,
max_ideal_idx: usize,
x: <<<R as PolyGCDLocallyDomain>::LocalField<'ring> as RingStore>::Type as RingBase>::Element,
) -> <<<R as PolyGCDLocallyDomain>::LocalRing<'ring> as RingStore>::Type as RingBase>::Elementwhere
R: 'ring,
unstable-enable only.R / miSource§fn reduce_partial<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: (&<R as PolyGCDLocallyDomain>::LocalRingBase<'ring>, usize),
to: (&<R as PolyGCDLocallyDomain>::LocalRingBase<'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>::LocalRingBase<'ring>, usize),
to: (&<R as PolyGCDLocallyDomain>::LocalRingBase<'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,
unstable-enable only.Source§fn lift_partial<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
from: (&<R as PolyGCDLocallyDomain>::LocalRingBase<'ring>, usize),
to: (&<R as PolyGCDLocallyDomain>::LocalRingBase<'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>::LocalRingBase<'ring>, usize),
to: (&<R as PolyGCDLocallyDomain>::LocalRingBase<'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,
unstable-enable only.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,
unstable-enable only.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.Source§fn dbg_ideal<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
out: &mut Formatter<'_>,
) -> Result<(), Error>where
R: 'ring,
fn dbg_ideal<'ring>(
&self,
p: &<R as PolyGCDLocallyDomain>::SuitableIdeal<'ring>,
out: &mut Formatter<'_>,
) -> Result<(), Error>where
R: 'ring,
unstable-enable only.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 power_decomposition_with_controller<P, Controller>(
poly_ring: P,
poly: &<<P as RingStore>::Type as RingBase>::Element,
controller: Controller,
) -> Vec<(<<P as RingStore>::Type as RingBase>::Element, usize)>where
P: RingStore + Copy,
<P as RingStore>::Type: PolyRing + DivisibilityRing,
<<P as RingStore>::Type as RingExtension>::BaseRing: RingStore<Type = R>,
Controller: ComputationController,
default fn power_decomposition_with_controller<P, Controller>(
poly_ring: P,
poly: &<<P as RingStore>::Type as RingBase>::Element,
controller: Controller,
) -> Vec<(<<P as RingStore>::Type as RingBase>::Element, usize)>where
P: RingStore + Copy,
<P as RingStore>::Type: PolyRing + DivisibilityRing,
<<P as RingStore>::Type as RingExtension>::BaseRing: RingStore<Type = R>,
Controller: ComputationController,
PolyTFracGCDRing::power_decomposition(), this writes a polynomial as a product
of powers of square-free polynomials. However, it additionally accepts a ComputationController
to customize the performed computation.Source§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 gcd_with_controller<P, Controller>(
poly_ring: P,
lhs: &<<P as RingStore>::Type as RingBase>::Element,
rhs: &<<P as RingStore>::Type as RingBase>::Element,
controller: Controller,
) -> <<P as RingStore>::Type as RingBase>::Elementwhere
P: RingStore + Copy,
<P as RingStore>::Type: PolyRing + DivisibilityRing,
<<P as RingStore>::Type as RingExtension>::BaseRing: RingStore<Type = R>,
Controller: ComputationController,
fn gcd_with_controller<P, Controller>(
poly_ring: P,
lhs: &<<P as RingStore>::Type as RingBase>::Element,
rhs: &<<P as RingStore>::Type as RingBase>::Element,
controller: Controller,
) -> <<P as RingStore>::Type as RingBase>::Elementwhere
P: RingStore + Copy,
<P as RingStore>::Type: PolyRing + DivisibilityRing,
<<P as RingStore>::Type as RingExtension>::BaseRing: RingStore<Type = R>,
Controller: ComputationController,
PolyTFracGCDRing::gcd(), this computes the gcd of two polynomials.
However, it additionally accepts a ComputationController to customize
the performed computation.Source§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§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.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.Source§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)).fn fma_base( &self, lhs: &Self::Element, rhs: &El<Self::BaseRing>, summand: Self::Element, ) -> Self::Element
Source§fn mul_assign_base_through_hom<S: ?Sized + RingBase, H: Homomorphism<S, <Self::BaseRing as RingStore>::Type>>(
&self,
lhs: &mut Self::Element,
rhs: &S::Element,
hom: H,
)
fn mul_assign_base_through_hom<S: ?Sized + RingBase, H: Homomorphism<S, <Self::BaseRing as RingStore>::Type>>( &self, lhs: &mut Self::Element, rhs: &S::Element, hom: H, )
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 moreSource§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,
unstable-enable only.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>,
unstable-enable only.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 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