pub struct ComposedHom<R, S, T, F, G>where
F: Homomorphism<R, S>,
G: Homomorphism<S, T>,
R: ?Sized + RingBase,
S: ?Sized + RingBase,
T: ?Sized + RingBase,{ /* private fields */ }
Expand description
The function composition of two homomorphisms f: R -> S
and g: S -> T
.
More concretely, this is the homomorphism R -> T
that maps x
to g(f(x))
.
The best way to create a ComposedHom
is through Homomorphism::compose()
.
Implementations§
Source§impl<R, S, T, F, G> ComposedHom<R, S, T, F, G>where
F: Clone + Homomorphism<R, S>,
G: Clone + Homomorphism<S, T>,
R: ?Sized + RingBase,
S: ?Sized + RingBase,
T: ?Sized + RingBase,
impl<R, S, T, F, G> ComposedHom<R, S, T, F, G>where
F: Clone + Homomorphism<R, S>,
G: Clone + Homomorphism<S, T>,
R: ?Sized + RingBase,
S: ?Sized + RingBase,
T: ?Sized + RingBase,
Sourcepub fn first(&self) -> &F
Available on crate feature unstable-enable
only.
pub fn first(&self) -> &F
unstable-enable
only.Returns a reference to f
, the homomorphism that is applied first
to input elements x
.
§Availability
This API is marked as unstable and is only available when the unstable-enable
crate feature is enabled. This comes with no stability guarantees, and could be changed or removed at any time.
Sourcepub fn second(&self) -> &G
Available on crate feature unstable-enable
only.
pub fn second(&self) -> &G
unstable-enable
only.Returns a reference to g
, the homomorphism that is applied second,
so to f(x)
when mapping an input element x
.
§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<R, S, T, F, G> Clone for ComposedHom<R, S, T, F, G>where
F: Clone + Homomorphism<R, S>,
G: Clone + Homomorphism<S, T>,
R: ?Sized + RingBase,
S: ?Sized + RingBase,
T: ?Sized + RingBase,
impl<R, S, T, F, G> Clone for ComposedHom<R, S, T, F, G>where
F: Clone + Homomorphism<R, S>,
G: Clone + Homomorphism<S, T>,
R: ?Sized + RingBase,
S: ?Sized + RingBase,
T: ?Sized + RingBase,
Source§impl<R, S, T, F, G> Homomorphism<R, T> for ComposedHom<R, S, T, F, G>where
F: Homomorphism<R, S>,
G: Homomorphism<S, T>,
R: ?Sized + RingBase,
S: ?Sized + RingBase,
T: ?Sized + RingBase,
impl<R, S, T, F, G> Homomorphism<R, T> for ComposedHom<R, S, T, F, G>where
F: Homomorphism<R, S>,
G: Homomorphism<S, T>,
R: ?Sized + RingBase,
S: ?Sized + RingBase,
T: ?Sized + RingBase,
Source§type DomainStore = <F as Homomorphism<R, S>>::DomainStore
type DomainStore = <F as Homomorphism<R, S>>::DomainStore
RingStore
used by this object to store the domain ring.Source§type CodomainStore = <G as Homomorphism<S, T>>::CodomainStore
type CodomainStore = <G as Homomorphism<S, T>>::CodomainStore
RingStore
used by this object to store the codomain ring.Source§fn domain<'a>(&'a self) -> &'a Self::DomainStore
fn domain<'a>(&'a self) -> &'a Self::DomainStore
Source§fn codomain<'a>(&'a self) -> &'a Self::CodomainStore
fn codomain<'a>(&'a self) -> &'a Self::CodomainStore
Source§fn map(&self, x: <R as RingBase>::Element) -> <T as RingBase>::Element
fn map(&self, x: <R as RingBase>::Element) -> <T as RingBase>::Element
Source§fn map_ref(&self, x: &<R as RingBase>::Element) -> <T as RingBase>::Element
fn map_ref(&self, x: &<R as RingBase>::Element) -> <T as RingBase>::Element
Source§fn mul_assign_map(
&self,
lhs: &mut <T as RingBase>::Element,
rhs: <R as RingBase>::Element,
)
fn mul_assign_map( &self, lhs: &mut <T as RingBase>::Element, rhs: <R as RingBase>::Element, )
Source§fn mul_assign_ref_map(
&self,
lhs: &mut <T as RingBase>::Element,
rhs: &<R as RingBase>::Element,
)
fn mul_assign_ref_map( &self, lhs: &mut <T as RingBase>::Element, rhs: &<R as RingBase>::Element, )
Source§fn fma_map(
&self,
lhs: &<T as RingBase>::Element,
rhs: &<R as RingBase>::Element,
summand: <T as RingBase>::Element,
) -> <T as RingBase>::Element
fn fma_map( &self, lhs: &<T as RingBase>::Element, rhs: &<R as RingBase>::Element, summand: <T as RingBase>::Element, ) -> <T as RingBase>::Element
lhs * rhs + summand
, where rhs
is mapped
into the ring via this homomorphism. Read moreSource§fn mul_map(
&self,
lhs: Codomain::Element,
rhs: Domain::Element,
) -> Codomain::Element
fn mul_map( &self, lhs: Codomain::Element, rhs: Domain::Element, ) -> Codomain::Element
Source§fn mul_ref_fst_map(
&self,
lhs: &Codomain::Element,
rhs: Domain::Element,
) -> Codomain::Element
fn mul_ref_fst_map( &self, lhs: &Codomain::Element, rhs: Domain::Element, ) -> Codomain::Element
Source§fn mul_ref_snd_map(
&self,
lhs: Codomain::Element,
rhs: &Domain::Element,
) -> Codomain::Element
fn mul_ref_snd_map( &self, lhs: Codomain::Element, rhs: &Domain::Element, ) -> Codomain::Element
Source§fn mul_ref_map(
&self,
lhs: &Codomain::Element,
rhs: &Domain::Element,
) -> Codomain::Element
fn mul_ref_map( &self, lhs: &Codomain::Element, rhs: &Domain::Element, ) -> Codomain::Element
Source§fn compose<F, PrevDomain: ?Sized + RingBase>(
self,
prev: F,
) -> ComposedHom<PrevDomain, Domain, Codomain, F, Self>where
Self: Sized,
F: Homomorphism<PrevDomain, Domain>,
fn compose<F, PrevDomain: ?Sized + RingBase>(
self,
prev: F,
) -> ComposedHom<PrevDomain, Domain, Codomain, F, Self>where
Self: Sized,
F: Homomorphism<PrevDomain, Domain>,
x -> self.map(prev.map(x))
.Source§fn mul_assign_ref_map_through_hom<First: ?Sized + RingBase, H: Homomorphism<First, Domain>>(
&self,
lhs: &mut Codomain::Element,
rhs: &First::Element,
hom: H,
)
fn mul_assign_ref_map_through_hom<First: ?Sized + RingBase, H: Homomorphism<First, Domain>>( &self, lhs: &mut Codomain::Element, rhs: &First::Element, hom: H, )
Source§fn mul_assign_map_through_hom<First: ?Sized + RingBase, H: Homomorphism<First, Domain>>(
&self,
lhs: &mut Codomain::Element,
rhs: First::Element,
hom: H,
)
fn mul_assign_map_through_hom<First: ?Sized + RingBase, H: Homomorphism<First, Domain>>( &self, lhs: &mut Codomain::Element, rhs: First::Element, hom: H, )
impl<R, S, T, F, G> Copy for ComposedHom<R, S, T, F, G>where
F: Copy + Homomorphism<R, S>,
G: Copy + Homomorphism<S, T>,
R: ?Sized + RingBase,
S: ?Sized + RingBase,
T: ?Sized + RingBase,
Auto Trait Implementations§
impl<R, S, T, F, G> Freeze for ComposedHom<R, S, T, F, G>
impl<R, S, T, F, G> RefUnwindSafe for ComposedHom<R, S, T, F, G>where
F: RefUnwindSafe,
G: RefUnwindSafe,
R: RefUnwindSafe + ?Sized,
S: RefUnwindSafe + ?Sized,
T: RefUnwindSafe + ?Sized,
impl<R, S, T, F, G> Send for ComposedHom<R, S, T, F, G>
impl<R, S, T, F, G> Sync for ComposedHom<R, S, T, F, G>
impl<R, S, T, F, G> Unpin for ComposedHom<R, S, T, F, G>
impl<R, S, T, F, G> UnwindSafe for ComposedHom<R, S, T, F, G>where
F: UnwindSafe,
G: UnwindSafe,
R: UnwindSafe + ?Sized,
S: UnwindSafe + ?Sized,
T: UnwindSafe + ?Sized,
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<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 more