pub struct IntHom<R>where
R: RingStore,{ /* private fields */ }Expand description
The ring homomorphism Z -> R that exists for any ring R.
§Example
let ring = zn_static::F17;
let hom = ring.int_hom();
assert_el_eq!(ring, hom.map(1), hom.map(18));Implementations§
Trait Implementations§
Source§impl<R> Homomorphism<StaticRingBase<i32>, <R as RingStore>::Type> for IntHom<R>where
R: RingStore,
impl<R> Homomorphism<StaticRingBase<i32>, <R as RingStore>::Type> for IntHom<R>where
R: RingStore,
type CodomainStore = R
type DomainStore = RingValue<StaticRingBase<i32>>
fn domain<'a>(&'a self) -> &'a Self::DomainStore
fn codomain<'a>(&'a self) -> &'a Self::CodomainStore
fn map(&self, x: i32) -> <R::Type as RingBase>::Element
fn mul_assign_map(&self, lhs: &mut <R::Type as RingBase>::Element, rhs: i32)
fn mul_assign_ref_map( &self, lhs: &mut <R::Type as RingBase>::Element, rhs: &<StaticRingBase<i32> as RingBase>::Element, )
fn map_ref(&self, x: &Domain::Element) -> Codomain::Element
fn mul_map( &self, lhs: Codomain::Element, rhs: Domain::Element, ) -> Codomain::Element
fn mul_ref_fst_map( &self, lhs: &Codomain::Element, rhs: Domain::Element, ) -> Codomain::Element
fn mul_ref_snd_map( &self, lhs: Codomain::Element, rhs: &Domain::Element, ) -> Codomain::Element
fn mul_ref_map( &self, lhs: &Codomain::Element, rhs: &Domain::Element, ) -> Codomain::Element
fn compose<F, PrevDomain: ?Sized + RingBase>(
self,
prev: F,
) -> ComposedHom<PrevDomain, Domain, Codomain, F, Self>where
Self: Sized,
F: Homomorphism<PrevDomain, Domain>,
impl<R> Copy for IntHom<R>
Auto Trait Implementations§
impl<R> Freeze for IntHom<R>where
R: Freeze,
impl<R> RefUnwindSafe for IntHom<R>where
R: RefUnwindSafe,
impl<R> Send for IntHom<R>where
R: Send,
impl<R> Sync for IntHom<R>where
R: Sync,
impl<R> Unpin for IntHom<R>where
R: Unpin,
impl<R> UnwindSafe for IntHom<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 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>
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