pub struct MultGroupBase<R: RingStore>(/* private fields */);
unstable-enable
only.Expand description
The multiplicative group of a ring, implements AbelianGroupBase
.
§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.
Implementations§
Source§impl<R: RingStore> MultGroupBase<R>
impl<R: RingStore> MultGroupBase<R>
Sourcepub fn new(ring: R) -> Self
pub fn new(ring: R) -> Self
§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 underlying_ring(&self) -> &R
pub fn underlying_ring(&self) -> &R
§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 from_ring_el(&self, x: El<R>) -> Option<MultGroupEl<R>>
pub fn from_ring_el(&self, x: El<R>) -> Option<MultGroupEl<R>>
If x
is contained in R*
, returns a MultGroupEl
representing
x
. Otherwise, None
is returned.
§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 as_ring_el<'a>(&self, x: &'a MultGroupEl<R>) -> &'a El<R>
pub fn as_ring_el<'a>(&self, x: &'a MultGroupEl<R>) -> &'a El<R>
Returns the ring element represented by the given group element.
§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: RingStore> AbelianGroupBase for MultGroupBase<R>
impl<R: RingStore> AbelianGroupBase for MultGroupBase<R>
Source§type Element = MultGroupEl<R>
type Element = MultGroupEl<R>
unstable-enable
only.Source§fn clone_el(&self, x: &Self::Element) -> Self::Element
fn clone_el(&self, x: &Self::Element) -> Self::Element
unstable-enable
only.Source§fn eq_el(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
fn eq_el(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
unstable-enable
only.Source§fn inv(&self, x: &Self::Element) -> Self::Element
fn inv(&self, x: &Self::Element) -> Self::Element
unstable-enable
only.x^-1
such that
x * x^-1
is the identity element.Source§fn identity(&self) -> Self::Element
fn identity(&self) -> Self::Element
unstable-enable
only.1
such that
x * 1 = x
for all group elements x
.Source§fn hash<H: Hasher>(&self, x: &Self::Element, hasher: &mut H)
fn hash<H: Hasher>(&self, x: &Self::Element, hasher: &mut H)
unstable-enable
only.Source§fn op(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element
fn op(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element
unstable-enable
only.Source§fn op_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
fn op_ref(&self, lhs: &Self::Element, rhs: &Self::Element) -> Self::Element
unstable-enable
only.Source§fn op_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element
fn op_ref_snd(&self, lhs: Self::Element, rhs: &Self::Element) -> Self::Element
unstable-enable
only.Source§impl<R> Clone for MultGroupBase<R>
impl<R> Clone for MultGroupBase<R>
Source§impl<R: RingStore> Debug for MultGroupBase<R>
impl<R: RingStore> Debug for MultGroupBase<R>
Source§impl<'de, R> Deserialize<'de> for MultGroupBase<R>where
R: Deserialize<'de> + RingStore,
impl<'de, R> Deserialize<'de> for MultGroupBase<R>where
R: Deserialize<'de> + RingStore,
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> PartialEq for MultGroupBase<R>
impl<R: RingStore> PartialEq for MultGroupBase<R>
Source§impl<R: RingStore> SerializableElementGroup for MultGroupBase<R>
impl<R: RingStore> SerializableElementGroup for MultGroupBase<R>
Source§fn serialize<S>(
&self,
el: &Self::Element,
serializer: S,
) -> Result<S::Ok, S::Error>where
S: Serializer,
fn serialize<S>(
&self,
el: &Self::Element,
serializer: S,
) -> Result<S::Ok, S::Error>where
S: Serializer,
unstable-enable
only.Source§fn deserialize<'de, D>(
&self,
deserializer: D,
) -> Result<Self::Element, D::Error>where
D: Deserializer<'de>,
fn deserialize<'de, D>(
&self,
deserializer: D,
) -> Result<Self::Element, D::Error>where
D: Deserializer<'de>,
unstable-enable
only.Source§impl<R> Serialize for MultGroupBase<R>
impl<R> Serialize for MultGroupBase<R>
impl<R> Copy for MultGroupBase<R>
Auto Trait Implementations§
impl<R> Freeze for MultGroupBase<R>where
R: Freeze,
impl<R> RefUnwindSafe for MultGroupBase<R>where
R: RefUnwindSafe,
impl<R> Send for MultGroupBase<R>where
R: Send,
impl<R> Sync for MultGroupBase<R>where
R: Sync,
impl<R> Unpin for MultGroupBase<R>where
R: Unpin,
impl<R> UnwindSafe for MultGroupBase<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
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