pub struct AddGroupBase<R: RingStore>(pub R);Available on crate feature
unstable-enable only.Expand description
The additive group of a ring, implements AbelianGroupBase.
§Attention
It is unlikely that you want to use this, except for testing group-related algorithms.
In most cases, it does not make much sense to compute dlogs in the additive
group of a ring using generic methods, since algorithms as in
crate::algorithms::linsolve will be much faster.
§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.
Tuple Fields§
§0: RTrait Implementations§
Source§impl<R: RingStore> AbelianGroupBase for AddGroupBase<R>where
R::Type: HashableElRing,
impl<R: RingStore> AbelianGroupBase for AddGroupBase<R>where
R::Type: HashableElRing,
Source§type Element = <<R as RingStore>::Type as RingBase>::Element
type Element = <<R as RingStore>::Type as RingBase>::Element
Available on crate feature
unstable-enable only.Type used to represent elements of this group.
Source§fn clone_el(&self, x: &Self::Element) -> Self::Element
fn clone_el(&self, x: &Self::Element) -> Self::Element
Available on crate feature
unstable-enable only.Clones an element of the group.
Source§fn eq_el(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
fn eq_el(&self, lhs: &Self::Element, rhs: &Self::Element) -> bool
Available on crate feature
unstable-enable only.Checks whether two group elements are equal.
Source§fn op(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element
fn op(&self, lhs: Self::Element, rhs: Self::Element) -> Self::Element
Available on crate feature
unstable-enable only.Applies the group operation to two elements.
Source§fn inv(&self, x: &Self::Element) -> Self::Element
fn inv(&self, x: &Self::Element) -> Self::Element
Available on crate feature
unstable-enable only.Computes the inverse of the give element, i.e. the unique group element
x^-1 such that
x * x^-1 is the identity element.Source§fn identity(&self) -> Self::Element
fn identity(&self) -> Self::Element
Available on crate feature
unstable-enable only.Returns the identity element of the group, i.e. the unique element
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)
Available on crate feature
unstable-enable only.Hashes the group element. Read more
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
Available on crate feature
unstable-enable only.Applies the group operation to two elements. Read more
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
Available on crate feature
unstable-enable only.Applies the group operation to two elements. Read more
Source§impl<R: RingStore + Clone> Clone for AddGroupBase<R>where
R::Type: HashableElRing,
impl<R: RingStore + Clone> Clone for AddGroupBase<R>where
R::Type: HashableElRing,
Source§impl<R: RingStore> PartialEq for AddGroupBase<R>where
R::Type: HashableElRing,
impl<R: RingStore> PartialEq for AddGroupBase<R>where
R::Type: HashableElRing,
Auto Trait Implementations§
impl<R> Freeze for AddGroupBase<R>where
R: Freeze,
impl<R> RefUnwindSafe for AddGroupBase<R>where
R: RefUnwindSafe,
impl<R> Send for AddGroupBase<R>where
R: Send,
impl<R> Sync for AddGroupBase<R>where
R: Sync,
impl<R> Unpin for AddGroupBase<R>where
R: Unpin,
impl<R> UnsafeUnpin for AddGroupBase<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for AddGroupBase<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