Struct feanor_math::homomorphism::IntHom
source · 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_map_ref( &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