FreeAlgebraImplBase

Struct FreeAlgebraImplBase 

Source
pub struct FreeAlgebraImplBase<R, V, A = Global, C = KaratsubaAlgorithm>{ /* private fields */ }
Expand description

Implementation for rings that are generated by a single algebraic element over a base ring, equivalently a quotient of a univariate polynomial ring R[X]/(f(X)).

§Example

let base_ring = StaticRing::<i64>::RING;
// ring of integers in the 6th cyclotomic number field
let ring = FreeAlgebraImpl::new(base_ring, 2, [-1, 1]);
let root_of_unity = ring.canonical_gen();
assert_el_eq!(ring, ring.one(), ring.pow(root_of_unity, 6));

Implementations§

Source§

impl<R, V, A, C> FreeAlgebraImplBase<R, V, A, C>

Source

pub fn set_convolution<C_new: ConvolutionAlgorithm<R::Type>>( self, new_convolution: C_new, ) -> FreeAlgebraImpl<R, V, A, C_new>

Available on crate feature unstable-enable only.
§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.

Source

pub fn allocator(&self) -> &A

Available on crate feature unstable-enable only.
§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.

Source

pub fn gen_name(&self) -> &'static str

Available on crate feature unstable-enable only.
§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.

Source

pub fn x_pow_rank(&self) -> &V

Available on crate feature unstable-enable only.
§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.

Source

pub fn convolution(&self) -> &C

Available on crate feature unstable-enable only.
§Availability

This API is marked as unstable and is only available when the unstable-enable crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.

Trait Implementations§

Source§

impl<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

Data required to compute the action of the canonical homomorphism on ring elements.
Source§

fn has_canonical_hom( &self, from: &AsFieldBase<AsFieldRingStore>, ) -> Option<Self::Homomorphism>

If there is a canonical homomorphism from -> self, returns Some(data), where data is additional data that can be used to compute the action of the homomorphism on ring elements. Otherwise, None is returned.
Source§

fn map_in( &self, from: &AsFieldBase<AsFieldRingStore>, el: FieldEl<AsFieldRingStore>, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element

Evaluates the homomorphism.
Source§

fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element

Evaluates the homomorphism, taking the element by reference.
Source§

fn mul_assign_map_in( &self, from: &S, lhs: &mut Self::Element, rhs: S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, and multiplies the result to lhs.
Source§

fn mul_assign_map_in_ref( &self, from: &S, lhs: &mut Self::Element, rhs: &S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, taking it by reference, and multiplies the result to lhs.
Source§

fn fma_map_in( &self, from: &S, lhs: &Self::Element, rhs: &S::Element, summand: Self::Element, hom: &Self::Homomorphism, ) -> Self::Element

Fused-multiply-add. Computes summand + lhs * rhs, where rhs is mapped into the ring via the homomorphism.
Source§

impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<AsLocalPIRBase<AsLocalPIRStore>> for FreeAlgebraImplBase<R2, V2, A2, C2>
where AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R1, V1, A1, C1>>, R1: RingStore, R1::Type: LinSolveRing, V1: VectorView<El<R1>>, A1: Allocator + Clone, C1: ConvolutionAlgorithm<R1::Type>, R2: RingStore, R2::Type: LinSolveRing + CanHomFrom<R1::Type>, V2: VectorView<El<R2>>, A2: Allocator + Clone, C2: ConvolutionAlgorithm<R2::Type>,

Source§

type Homomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Homomorphism

Data required to compute the action of the canonical homomorphism on ring elements.
Source§

fn has_canonical_hom( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, ) -> Option<Self::Homomorphism>

If there is a canonical homomorphism from -> self, returns Some(data), where data is additional data that can be used to compute the action of the homomorphism on ring elements. Otherwise, None is returned.
Source§

fn map_in( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, el: LocalPIREl<AsLocalPIRStore>, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element

Evaluates the homomorphism.
Source§

fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element

Evaluates the homomorphism, taking the element by reference.
Source§

fn mul_assign_map_in( &self, from: &S, lhs: &mut Self::Element, rhs: S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, and multiplies the result to lhs.
Source§

fn mul_assign_map_in_ref( &self, from: &S, lhs: &mut Self::Element, rhs: &S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, taking it by reference, and multiplies the result to lhs.
Source§

fn fma_map_in( &self, from: &S, lhs: &Self::Element, rhs: &S::Element, summand: Self::Element, hom: &Self::Homomorphism, ) -> Self::Element

Fused-multiply-add. Computes 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>,

Source§

type Homomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Homomorphism

Data required to compute the action of the canonical homomorphism on ring elements.
Source§

fn has_canonical_hom( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, ) -> Option<Self::Homomorphism>

If there is a canonical homomorphism from -> self, returns Some(data), where data is additional data that can be used to compute the action of the homomorphism on ring elements. Otherwise, None is returned.
Source§

fn map_in( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, el: <FreeAlgebraImplBase<R1, V1, A1, C1> as RingBase>::Element, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element

Evaluates the homomorphism.
Source§

fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element

Evaluates the homomorphism, taking the element by reference.
Source§

fn mul_assign_map_in( &self, from: &S, lhs: &mut Self::Element, rhs: S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, and multiplies the result to lhs.
Source§

fn mul_assign_map_in_ref( &self, from: &S, lhs: &mut Self::Element, rhs: &S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, taking it by reference, and multiplies the result to lhs.
Source§

fn fma_map_in( &self, from: &S, lhs: &Self::Element, rhs: &S::Element, summand: Self::Element, hom: &Self::Homomorphism, ) -> Self::Element

Fused-multiply-add. Computes summand + lhs * rhs, where rhs is mapped into the ring via the homomorphism.
Source§

impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>> for AsLocalPIRBase<AsLocalPIRStore>
where AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R2, V2, A2, C2>>, R1: RingStore, R1::Type: LinSolveRing, V1: VectorView<El<R1>>, A1: Allocator + Clone, C1: ConvolutionAlgorithm<R1::Type>, R2: RingStore, R2::Type: LinSolveRing + CanHomFrom<R1::Type>, V2: VectorView<El<R2>>, A2: Allocator + Clone, C2: ConvolutionAlgorithm<R2::Type>,

Source§

type Homomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Homomorphism

Data required to compute the action of the canonical homomorphism on ring elements.
Source§

fn has_canonical_hom( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, ) -> Option<Self::Homomorphism>

If there is a canonical homomorphism from -> self, returns Some(data), where data is additional data that can be used to compute the action of the homomorphism on ring elements. Otherwise, None is returned.
Source§

fn map_in( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, el: <FreeAlgebraImplBase<R1, V1, A1, C1> as RingBase>::Element, hom: &Self::Homomorphism, ) -> <Self as RingBase>::Element

Evaluates the homomorphism.
Source§

fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element

Evaluates the homomorphism, taking the element by reference.
Source§

fn mul_assign_map_in( &self, from: &S, lhs: &mut Self::Element, rhs: S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, and multiplies the result to lhs.
Source§

fn mul_assign_map_in_ref( &self, from: &S, lhs: &mut Self::Element, rhs: &S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, taking it by reference, and multiplies the result to lhs.
Source§

fn fma_map_in( &self, from: &S, lhs: &Self::Element, rhs: &S::Element, summand: Self::Element, hom: &Self::Homomorphism, ) -> Self::Element

Fused-multiply-add. Computes summand + lhs * rhs, where rhs is mapped into the ring via the homomorphism.
Source§

impl<R1, V1, A1, C1, R2, V2, A2, C2> CanHomFrom<FreeAlgebraImplBase<R1, V1, A1, C1>> for FreeAlgebraImplBase<R2, V2, A2, C2>
where R1: RingStore, V1: VectorView<El<R1>>, A1: Allocator + Clone, C1: ConvolutionAlgorithm<R1::Type>, R2: RingStore, V2: VectorView<El<R2>>, A2: Allocator + Clone, C2: ConvolutionAlgorithm<R2::Type>, R2::Type: CanHomFrom<R1::Type>,

Source§

type Homomorphism = <<R2 as RingStore>::Type as CanHomFrom<<R1 as RingStore>::Type>>::Homomorphism

Data required to compute the action of the canonical homomorphism on ring elements.
Source§

fn has_canonical_hom( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, ) -> Option<Self::Homomorphism>

If there is a canonical homomorphism from -> self, returns Some(data), where data is additional data that can be used to compute the action of the homomorphism on ring elements. Otherwise, None is returned.
Source§

fn map_in( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, el: <FreeAlgebraImplBase<R1, V1, A1> as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element

Evaluates the homomorphism.
Source§

fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element

Evaluates the homomorphism, taking the element by reference.
Source§

fn mul_assign_map_in( &self, from: &S, lhs: &mut Self::Element, rhs: S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, and multiplies the result to lhs.
Source§

fn mul_assign_map_in_ref( &self, from: &S, lhs: &mut Self::Element, rhs: &S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, taking it by reference, and multiplies the result to lhs.
Source§

fn fma_map_in( &self, from: &S, lhs: &Self::Element, rhs: &S::Element, summand: Self::Element, hom: &Self::Homomorphism, ) -> Self::Element

Fused-multiply-add. Computes summand + lhs * rhs, where rhs is mapped into the ring via the homomorphism.
Source§

impl<Impl, R, A, V, C> CanHomFrom<GaloisFieldBase<Impl>> for FreeAlgebraImplBase<R, V, A, C>

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

Data required to compute the action of the canonical homomorphism on ring elements.
Source§

fn has_canonical_hom( &self, from: &GaloisFieldBase<Impl>, ) -> Option<Self::Homomorphism>

If there is a canonical homomorphism from -> self, returns Some(data), where data is additional data that can be used to compute the action of the homomorphism on ring elements. Otherwise, None is returned.
Source§

fn map_in( &self, from: &GaloisFieldBase<Impl>, el: <GaloisFieldBase<Impl> as RingBase>::Element, hom: &Self::Homomorphism, ) -> Self::Element

Evaluates the homomorphism.
Source§

fn map_in_ref( &self, from: &S, el: &S::Element, hom: &Self::Homomorphism, ) -> Self::Element

Evaluates the homomorphism, taking the element by reference.
Source§

fn mul_assign_map_in( &self, from: &S, lhs: &mut Self::Element, rhs: S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, and multiplies the result to lhs.
Source§

fn mul_assign_map_in_ref( &self, from: &S, lhs: &mut Self::Element, rhs: &S::Element, hom: &Self::Homomorphism, )

Evaluates the homomorphism on rhs, taking it by reference, and multiplies the result to lhs.
Source§

fn fma_map_in( &self, from: &S, lhs: &Self::Element, rhs: &S::Element, summand: Self::Element, hom: &Self::Homomorphism, ) -> Self::Element

Fused-multiply-add. Computes 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>,

Source§

type Isomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Isomorphism

Data required to compute a preimage under the canonical homomorphism.
Source§

fn has_canonical_iso( &self, from: &AsFieldBase<AsFieldRingStore>, ) -> Option<Self::Isomorphism>

If there is a canonical homomorphism from -> self, and this homomorphism is an isomorphism, returns Some(data), where data is additional data that can be used to compute preimages under the homomorphism. Otherwise, None is returned.
Source§

fn map_out( &self, from: &AsFieldBase<AsFieldRingStore>, el: <Self as RingBase>::Element, hom: &Self::Isomorphism, ) -> FieldEl<AsFieldRingStore>

Computes the preimage of el under the canonical homomorphism from -> self.
Source§

impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<AsLocalPIRBase<AsLocalPIRStore>> for FreeAlgebraImplBase<R2, V2, A2, C2>
where AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R1, V1, A1, C1>>, R1: RingStore, R1::Type: LinSolveRing, V1: VectorView<El<R1>>, A1: Allocator + Clone, C1: ConvolutionAlgorithm<R1::Type>, R2: RingStore, R2::Type: LinSolveRing + CanIsoFromTo<R1::Type>, V2: VectorView<El<R2>>, A2: Allocator + Clone, C2: ConvolutionAlgorithm<R2::Type>,

Source§

type Isomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Isomorphism

Data required to compute a preimage under the canonical homomorphism.
Source§

fn has_canonical_iso( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, ) -> Option<Self::Isomorphism>

If there is a canonical homomorphism from -> self, and this homomorphism is an isomorphism, returns Some(data), where data is additional data that can be used to compute preimages under the homomorphism. Otherwise, None is returned.
Source§

fn map_out( &self, from: &AsLocalPIRBase<AsLocalPIRStore>, el: <Self as RingBase>::Element, hom: &Self::Isomorphism, ) -> LocalPIREl<AsLocalPIRStore>

Computes the preimage of 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>,

Source§

type Isomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Isomorphism

Data required to compute a preimage under the canonical homomorphism.
Source§

fn has_canonical_iso( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, ) -> Option<Self::Isomorphism>

If there is a canonical homomorphism from -> self, and this homomorphism is an isomorphism, returns Some(data), where data is additional data that can be used to compute preimages under the homomorphism. Otherwise, None is returned.
Source§

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

Computes the preimage of el under the canonical homomorphism from -> self.
Source§

impl<AsLocalPIRStore, R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>> for AsLocalPIRBase<AsLocalPIRStore>
where AsLocalPIRStore: RingStore<Type = FreeAlgebraImplBase<R2, V2, A2, C2>>, R1: RingStore, R1::Type: LinSolveRing, V1: VectorView<El<R1>>, A1: Allocator + Clone, C1: ConvolutionAlgorithm<R1::Type>, R2: RingStore, R2::Type: LinSolveRing + CanIsoFromTo<R1::Type>, V2: VectorView<El<R2>>, A2: Allocator + Clone, C2: ConvolutionAlgorithm<R2::Type>,

Source§

type Isomorphism = <FreeAlgebraImplBase<R2, V2, A2, C2> as CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>>>::Isomorphism

Data required to compute a preimage under the canonical homomorphism.
Source§

fn has_canonical_iso( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, ) -> Option<Self::Isomorphism>

If there is a canonical homomorphism from -> self, and this homomorphism is an isomorphism, returns Some(data), where data is additional data that can be used to compute preimages under the homomorphism. Otherwise, None is returned.
Source§

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

Computes the preimage of el under the canonical homomorphism from -> self.
Source§

impl<R1, V1, A1, C1, R2, V2, A2, C2> CanIsoFromTo<FreeAlgebraImplBase<R1, V1, A1, C1>> for FreeAlgebraImplBase<R2, V2, A2, C2>
where R1: RingStore, V1: VectorView<El<R1>>, A1: Allocator + Clone, C1: ConvolutionAlgorithm<R1::Type>, R2: RingStore, V2: VectorView<El<R2>>, A2: Allocator + Clone, C2: ConvolutionAlgorithm<R2::Type>, R2::Type: CanIsoFromTo<R1::Type>,

Source§

type Isomorphism = <<R2 as RingStore>::Type as CanIsoFromTo<<R1 as RingStore>::Type>>::Isomorphism

Data required to compute a preimage under the canonical homomorphism.
Source§

fn has_canonical_iso( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, ) -> Option<Self::Isomorphism>

If there is a canonical homomorphism from -> self, and this homomorphism is an isomorphism, returns Some(data), where data is additional data that can be used to compute preimages under the homomorphism. Otherwise, None is returned.
Source§

fn map_out( &self, from: &FreeAlgebraImplBase<R1, V1, A1, C1>, el: <FreeAlgebraImplBase<R2, V2, A2> as RingBase>::Element, iso: &Self::Isomorphism, ) -> <FreeAlgebraImplBase<R1, V1, A1, C1> as RingBase>::Element

Computes the preimage of el under the canonical homomorphism from -> self.
Source§

impl<Impl, R, A, V, C> CanIsoFromTo<GaloisFieldBase<Impl>> for FreeAlgebraImplBase<R, V, A, C>

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

Data required to compute a preimage under the canonical homomorphism.
Source§

fn has_canonical_iso( &self, from: &GaloisFieldBase<Impl>, ) -> Option<Self::Isomorphism>

If there is a canonical homomorphism from -> self, and this homomorphism is an isomorphism, returns Some(data), where data is additional data that can be used to compute preimages under the homomorphism. Otherwise, None is returned.
Source§

fn map_out( &self, from: &GaloisFieldBase<Impl>, el: Self::Element, iso: &Self::Isomorphism, ) -> <GaloisFieldBase<Impl> as RingBase>::Element

Computes the preimage of el under the canonical homomorphism from -> self.
Source§

impl<R, V, A, C> Clone for FreeAlgebraImplBase<R, V, A, C>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<R, V, A, C> Debug for FreeAlgebraImplBase<R, V, A, C>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, R> Deserialize<'de> for FreeAlgebraImplBase<R, SparseMapVector<R>, Global, KaratsubaAlgorithm>

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'de, R> Deserialize<'de> for FreeAlgebraImplBase<R, Vec<El<R>>, Global, KaratsubaAlgorithm>

Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<R, V, A, C> DivisibilityRing for FreeAlgebraImplBase<R, V, A, C>

It seems like a good idea to also implement DivisibilityRing::prepare_divisor() and the prepared division functions here. However, currently the interface of LinSolveRing does not support this. I am not yet sure what is the best approach here, but it seems unlikely that this can be done properly without a breaking release

  • Either change LinSolveRing to support “factorizations” of matrices, or rather the equivalent to “prepared divisors” of matrices
  • Implement DivisibilityRing::prepare_divisor() only for R::Type: [PrincipalIdealRing], which however requires specialization or a specialization workaround

TODO: Decide and implement on the next breaking release

Source§

fn checked_left_div( &self, lhs: &Self::Element, rhs: &Self::Element, ) -> Option<Self::Element>

Checks whether there is an element x such that rhs * x = lhs, and returns it if it exists. Read more
Source§

fn balance_factor<'a, I>(&self, elements: I) -> Option<Self::Element>
where I: Iterator<Item = &'a Self::Element>, Self: 'a,

Function that computes a “balancing” factor of a sequence of ring elements. The only use of the balancing factor is to increase performance, in particular, dividing all elements in the sequence by this factor should make them “smaller” resp. cheaper to process. Read more
Source§

default fn invert(&self, el: &Self::Element) -> Option<Self::Element>

If the given element is a unit, returns its inverse, otherwise None. Read more
Source§

type PreparedDivisorData = ()

Additional data associated to a fixed ring element that can be used to speed up division by this ring element. Read more
Source§

fn divides_left(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool

Returns whether there is an element x such that rhs * x = lhs. If you need such an element, consider using DivisibilityRing::checked_left_div(). Read more
Source§

fn divides(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool

Same as DivisibilityRing::divides_left(), but requires a commutative ring.
Source§

fn checked_div( &self, lhs: &Self::Element, rhs: &Self::Element, ) -> Option<Self::Element>

Same as DivisibilityRing::checked_left_div(), but requires a commutative ring.
Source§

fn is_unit(&self, x: &Self::Element) -> bool

Returns whether the given element is a unit, i.e. has an inverse.
Source§

fn prepare_divisor(&self, _: &Self::Element) -> Self::PreparedDivisorData

“Prepares” an element of this ring for division. Read more
Source§

fn checked_left_div_prepared( &self, lhs: &Self::Element, rhs: &Self::Element, _rhs_prep: &Self::PreparedDivisorData, ) -> Option<Self::Element>

Same as DivisibilityRing::checked_left_div() but for a prepared divisor. Read more
Source§

fn divides_left_prepared( &self, lhs: &Self::Element, rhs: &Self::Element, _rhs_prep: &Self::PreparedDivisorData, ) -> bool

Same as DivisibilityRing::divides_left() but for a prepared divisor. Read more
Source§

fn is_unit_prepared(&self, x: &PreparedDivisor<Self>) -> bool

Same as DivisibilityRing::is_unit() but for a prepared divisor. Read more
Source§

impl<R, V, A, C> FiniteRing for FreeAlgebraImplBase<R, V, A, C>

Source§

type ElementsIter<'a> = MultiProduct<<<R as RingStore>::Type as FiniteRing>::ElementsIter<'a>, WRTCanonicalBasisElementCreator<'a, R, V, A, C>, CloneRingEl<&'a R>, <FreeAlgebraImplBase<R, V, A, C> as RingBase>::Element> where Self: 'a

Type of the iterator returned by FiniteRing::elements(), which should iterate over all elements of the ring.
Source§

fn elements<'a>(&'a self) -> Self::ElementsIter<'a>

Returns an iterator over all elements of this ring. The order is not specified.
Source§

fn size<I: IntegerRingStore + Copy>(&self, ZZ: I) -> Option<El<I>>
where I::Type: IntegerRing,

Returns the number of elements in this ring, if it fits within the given integer ring.
Source§

fn random_element<G: FnMut() -> u64>( &self, rng: G, ) -> <Self as RingBase>::Element

Returns a uniformly random element from this ring, using the randomness provided by rng.
Source§

impl<R, V, A, C> FiniteRingSpecializable for FreeAlgebraImplBase<R, V, A, C>

Source§

fn specialize<O: FiniteRingOperation<Self>>(op: O) -> O::Output

Available on crate feature unstable-enable only.
Source§

fn is_finite_ring() -> bool

Available on crate feature unstable-enable only.
Source§

impl<R, V, A, C> FreeAlgebra for FreeAlgebraImplBase<R, V, A, C>

Source§

type VectorRepresentation<'a> = CloneElFn<&'a [<<R as RingStore>::Type as RingBase>::Element], <<R as RingStore>::Type as RingBase>::Element, CloneRingEl<&'a R>> where Self: 'a

Type of the canonical-basis representation of a ring element, as returned by FreeAlgebra::wrt_canonical_basis().
Source§

fn canonical_gen(&self) -> Self::Element

Returns the fixed element that generates this ring as a free module over the base ring.
Source§

fn wrt_canonical_basis<'a>( &'a self, el: &'a Self::Element, ) -> Self::VectorRepresentation<'a>

Returns the representation of the element w.r.t. the canonical basis, that is the basis given by the powers x^i where x is the canonical generator given by FreeAlgebra::canonical_gen() and i goes from 0 to rank - 1. Read more
Source§

fn from_canonical_basis<W>(&self, vec: W) -> Self::Element
where W: IntoIterator<Item = El<Self::BaseRing>>, W::IntoIter: DoubleEndedIterator,

Returns the element that has the given representation w.r.t. the canonical basis, that is the basis given by the powers x^i where x is the canonical generator given by FreeAlgebra::canonical_gen() and i goes from 0 to rank - 1. Read more
Source§

fn rank(&self) -> usize

Returns the rank of this ring as a free module over the base ring.
Source§

fn from_canonical_basis_extended<V>(&self, vec: V) -> Self::Element
where V: IntoIterator<Item = El<Self::BaseRing>>,

Like 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>

Computes the characteristic polynomial of the given element. Read more
Source§

fn minpoly<P, H>(&self, el: &Self::Element, poly_ring: P, hom: H) -> El<P>

Computes the (or a) minimal polynomial of the given element. Read more
Source§

fn trace(&self, el: Self::Element) -> El<Self::BaseRing>

Computes the trace of an element a in this ring extension, which is defined as the matrix trace of the multiplication-by-a map. Read more
Source§

fn discriminant(&self) -> El<Self::BaseRing>

Computes the discriminant of the canonical basis of this ring extension, which is defined as the determinant of the trace matrix (Tr(a^(i + j))), where a is the canonical generator of this ring extension. Read more
Source§

impl<R, V, A, C> HashableElRing for FreeAlgebraImplBase<R, V, A, C>

Source§

fn hash<H: Hasher>(&self, el: &Self::Element, h: &mut H)

Hashes the given ring element.
Source§

impl<R, V, A_ring, C_ring> LinSolveRing for FreeAlgebraImplBase<R, V, A_ring, C_ring>
where R: RingStore, R::Type: LinSolveRing, V: VectorView<El<R>>, A_ring: Allocator + Clone, C_ring: ConvolutionAlgorithm<R::Type>,

Source§

fn solve_right<V1, V2, V3, A>( &self, lhs: SubmatrixMut<'_, V1, Self::Element>, rhs: SubmatrixMut<'_, V2, Self::Element>, out: SubmatrixMut<'_, V3, Self::Element>, allocator: A, ) -> SolveResult
where V1: AsPointerToSlice<Self::Element>, V2: AsPointerToSlice<Self::Element>, V3: AsPointerToSlice<Self::Element>, A: Allocator,

Tries to find a matrix X such that lhs * X = rhs. Read more
Source§

impl<R, V, A, C> PartialEq for FreeAlgebraImplBase<R, V, A, C>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<R, V, A, C> RingBase for FreeAlgebraImplBase<R, V, A, C>

Source§

type Element = FreeAlgebraImplEl<R, A>

Type of elements of the ring
Source§

fn clone_el(&self, val: &Self::Element) -> Self::Element

Source§

fn add_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)

Source§

fn add_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)

Source§

fn sub_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)

Source§

fn negate_inplace(&self, lhs: &mut Self::Element)

Source§

fn mul_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)

Source§

fn mul_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)

Source§

fn fma( &self, lhs: &Self::Element, rhs: &Self::Element, summand: Self::Element, ) -> Self::Element

Fused-multiply-add. This computes summand + lhs * rhs.
Source§

fn from_int(&self, value: i32) -> Self::Element

Source§

fn eq_el(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool

Source§

fn is_zero(&self, value: &Self::Element) -> bool

Source§

fn is_one(&self, value: &Self::Element) -> bool

Source§

fn is_neg_one(&self, value: &Self::Element) -> bool

Source§

fn is_commutative(&self) -> bool

Returns whether the ring is commutative, i.e. a * b = b * a for all elements a, b. Note that addition is assumed to be always commutative.
Source§

fn is_noetherian(&self) -> bool

Returns whether the ring is noetherian, i.e. every ideal is finitely generated. Read more
Source§

fn is_approximate(&self) -> bool

Returns whether this ring computes with approximations to elements. This would usually be the case for rings that are based on f32 or f64, to represent real or complex numbers. Read more
Source§

fn dbg<'a>(&self, value: &Self::Element, out: &mut Formatter<'a>) -> Result

Writes a human-readable representation of value to out. Read more
Source§

fn dbg_within<'a>( &self, value: &Self::Element, out: &mut Formatter<'a>, env: EnvBindingStrength, ) -> Result

Writes a human-readable representation of value to out, taking into account the possible context to place parenthesis as needed. Read more
Source§

fn mul_assign_int(&self, lhs: &mut Self::Element, rhs: i32)

Source§

fn fma_int( &self, lhs: &Self::Element, rhs: i32, summand: Self::Element, ) -> Self::Element

Fused-multiply-add with an integer. This computes summand + lhs * rhs.
Source§

fn characteristic<I: IntegerRingStore + Copy>(&self, ZZ: I) -> Option<El<I>>
where I::Type: IntegerRing,

Returns the characteristic of this ring as an element of the given implementation of ZZ. Read more
Source§

fn square(&self, value: &mut Self::Element)

Source§

fn zero(&self) -> Self::Element

Source§

fn one(&self) -> Self::Element

Source§

fn neg_one(&self) -> Self::Element

Source§

fn negate(&self, value: Self::Element) -> Self::Element

Source§

fn sub_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)

Source§

fn mul_int(&self, lhs: Self::Element, rhs: i32) -> Self::Element

Source§

fn mul_int_ref(&self, lhs: &Self::Element, rhs: i32) -> Self::Element

Source§

fn sub_self_assign(&self, lhs: &mut Self::Element, rhs: Self::Element)

Computes lhs := rhs - lhs.
Source§

fn sub_self_assign_ref(&self, lhs: &mut Self::Element, rhs: &Self::Element)

Computes lhs := rhs - lhs.
Source§

fn add_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element

Source§

fn add_ref_fst(&self, lhs: &Self::Element, rhs: Self::Element) -> Self::Element

Source§

fn add_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element

Source§

fn add(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element

Source§

fn sub_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element

Source§

fn sub_ref_fst(&self, lhs: &Self::Element, rhs: Self::Element) -> Self::Element

Source§

fn sub_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element

Source§

fn sub(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element

Source§

fn mul_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element

Source§

fn mul_ref_fst(&self, lhs: &Self::Element, rhs: Self::Element) -> Self::Element

Source§

fn mul_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element

Source§

fn mul(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element

Source§

fn pow_gen<R: RingStore>( &self, x: Self::Element, power: &El<R>, integers: R, ) -> Self::Element
where R::Type: IntegerRing,

Raises x to the power of an arbitrary, nonnegative integer given by a custom integer ring implementation. Read more
Source§

fn sum<I>(&self, els: I) -> Self::Element
where I: IntoIterator<Item = Self::Element>,

Sums the elements given by the iterator. Read more
Source§

fn prod<I>(&self, els: I) -> Self::Element
where I: IntoIterator<Item = Self::Element>,

Computes the product of the elements given by the iterator. Read more
Source§

impl<R, V, A, C> RingExtension for FreeAlgebraImplBase<R, V, A, C>

Source§

type BaseRing = R

Type of the base ring; Read more
Source§

fn base_ring<'a>(&'a self) -> &'a Self::BaseRing

Returns a reference to the base ring.
Source§

fn from(&self, x: El<Self::BaseRing>) -> Self::Element

Maps an element of the base ring into this ring. Read more
Source§

fn mul_assign_base(&self, lhs: &mut Self::Element, rhs: &El<Self::BaseRing>)

Computes lhs := lhs * rhs, where rhs is mapped into this ring via RingExtension::from_ref(). Note that this may be faster than self.mul_assign(lhs, self.from_ref(rhs)).
Source§

fn fma_base( &self, lhs: &Self::Element, rhs: &El<Self::BaseRing>, summand: Self::Element, ) -> Self::Element

Source§

fn from_ref(&self, x: &El<Self::BaseRing>) -> Self::Element

Maps an element of the base ring (given as reference) into this ring.
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, )

Computes lhs := lhs * rhs, where rhs is mapped into this ring via the given homomorphism, followed by the inclusion (as specified by RingExtension::from_ref()). Read more
Source§

impl<R, V, A, C> SerializableElementRing for FreeAlgebraImplBase<R, V, A, C>

Source§

fn deserialize<'de, D>( &self, deserializer: D, ) -> Result<Self::Element, D::Error>
where D: Deserializer<'de>,

Available on crate feature unstable-enable only.
Deserializes an element of this ring from the given deserializer.
Source§

fn serialize<S>( &self, el: &Self::Element, serializer: S, ) -> Result<S::Ok, S::Error>
where S: Serializer,

Available on crate feature unstable-enable only.
Serializes an element of this ring to the given serializer.
Source§

impl<R, V> Serialize for FreeAlgebraImplBase<R, V, Global, KaratsubaAlgorithm>

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<R, V, A, C> Copy for FreeAlgebraImplBase<R, V, A, C>
where R: RingStore + Copy, V: VectorView<El<R>> + Copy, A: Allocator + Copy, C: ConvolutionAlgorithm<R::Type> + Copy, El<R>: Copy,

Auto Trait Implementations§

§

impl<R, V, A, C> Freeze for FreeAlgebraImplBase<R, V, A, C>
where R: Freeze, V: Freeze, A: Freeze, C: Freeze,

§

impl<R, V, A, C> RefUnwindSafe for FreeAlgebraImplBase<R, V, A, C>

§

impl<R, V, A, C> Send for FreeAlgebraImplBase<R, V, A, C>
where R: Send, V: Send, A: Send, C: Send,

§

impl<R, V, A, C> Sync for FreeAlgebraImplBase<R, V, A, C>
where R: Sync, V: Sync, A: Sync, C: Sync,

§

impl<R, V, A, C> Unpin for FreeAlgebraImplBase<R, V, A, C>
where R: Unpin, V: Unpin, A: Unpin, C: Unpin,

§

impl<R, V, A, C> UnwindSafe for FreeAlgebraImplBase<R, V, A, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<R> ComputeInnerProduct for R
where R: RingBase + ?Sized,

Source§

default fn inner_product_ref_fst<'a, I>( &self, els: I, ) -> <R as RingBase>::Element
where I: Iterator<Item = (&'a <R as RingBase>::Element, <R as RingBase>::Element)>, <R as RingBase>::Element: 'a,

Available on crate feature unstable-enable only.
Computes the inner product sum_i lhs[i] * rhs[i].
Source§

default fn inner_product_ref<'a, I>(&self, els: I) -> <R as RingBase>::Element
where I: Iterator<Item = (&'a <R as RingBase>::Element, &'a <R as RingBase>::Element)>, <R as RingBase>::Element: 'a,

Available on crate feature unstable-enable only.
Computes the inner product sum_i lhs[i] * rhs[i].
Source§

default fn inner_product<I>(&self, els: I) -> <R as RingBase>::Element
where I: Iterator<Item = (<R as RingBase>::Element, <R as RingBase>::Element)>,

Available on crate feature unstable-enable only.
Computes the inner product sum_i lhs[i] * rhs[i].
Source§

impl<R, S> CooleyTuckeyButterfly<S> for R
where S: RingBase + ?Sized, R: RingBase + ?Sized,

Source§

default fn butterfly<V, H>( &self, hom: H, values: &mut V, twiddle: &<S as RingBase>::Element, i1: usize, i2: usize, )
where V: VectorViewMut<<R as RingBase>::Element>, H: Homomorphism<S, R>,

👎Deprecated
Should compute (values[i1], values[i2]) := (values[i1] + twiddle * values[i2], values[i1] - twiddle * values[i2]). Read more
Source§

default fn butterfly_new<H>( hom: H, x: &mut <R as RingBase>::Element, y: &mut <R as RingBase>::Element, twiddle: &<S as RingBase>::Element, )
where H: Homomorphism<S, R>,

Should compute (x, y) := (x + twiddle * y, x - twiddle * y). Read more
Source§

default fn inv_butterfly<V, H>( &self, hom: H, values: &mut V, twiddle: &<S as RingBase>::Element, i1: usize, i2: usize, )
where V: VectorViewMut<<R as RingBase>::Element>, H: Homomorphism<S, R>,

👎Deprecated
Should compute (values[i1], values[i2]) := (values[i1] + values[i2], (values[i1] - values[i2]) * twiddle) Read more
Source§

default fn inv_butterfly_new<H>( hom: H, x: &mut <R as RingBase>::Element, y: &mut <R as RingBase>::Element, twiddle: &<S as RingBase>::Element, )
where H: Homomorphism<S, R>,

Should compute (x, y) := (x + y, (x - y) * twiddle) Read more
Source§

default fn prepare_for_fft(&self, _value: &mut <R as RingBase>::Element)

Possibly pre-processes elements before the FFT starts. Here you can bring ring element into a certain form, and assume during CooleyTuckeyButterfly::butterfly_new() that the inputs are in this form.
Source§

default fn prepare_for_inv_fft(&self, _value: &mut <R as RingBase>::Element)

Possibly pre-processes elements before the inverse FFT starts. Here you can bring ring element into a certain form, and assume during CooleyTuckeyButterfly::inv_butterfly_new() that the inputs are in this form.
Source§

impl<R, S> CooleyTukeyRadix3Butterfly<S> for R
where R: RingBase + ?Sized, S: RingBase + ?Sized,

Source§

default fn prepare_for_fft(&self, _value: &mut <R as RingBase>::Element)

Available on crate feature 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.

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>,

Available on crate feature unstable-enable only.
Should compute (a, b, c) := (a + t b + t^2 c, a + t z b + t^2 z^2 c, a + t z^2 b + t^2 z c). Read more
Source§

default fn inv_butterfly<H>( hom: H, a: &mut <R as RingBase>::Element, b: &mut <R as RingBase>::Element, c: &mut <R as RingBase>::Element, z: &<S as RingBase>::Element, t: &<S as RingBase>::Element, t_sqr: &<S as RingBase>::Element, )
where H: Homomorphism<S, R>,

Available on crate feature unstable-enable only.
Should compute (a, b, c) := (a + b + c, t (a + z^2 b + z c), t^2 (a + z b + z^2 c)). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<R> KaratsubaHint for R
where R: RingBase + ?Sized,

Source§

default fn karatsuba_threshold(&self) -> usize

Available on crate feature unstable-enable only.
Define a threshold from which on KaratsubaAlgorithm will use the Karatsuba algorithm. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R> StrassenHint for R
where R: RingBase + ?Sized,

Source§

default fn strassen_threshold(&self) -> usize

Available on crate feature unstable-enable only.
Define a threshold from which on StrassenAlgorithm will use the Strassen algorithm. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<R> SelfIso for R
where R: CanIsoFromTo<R> + ?Sized,