Struct Group

Source
pub struct Group<Domain, G>
where Domain: Eq + Hash + Clone, G: GroupElement + GroupAction<Domain = Domain> + PartialEq,
{ /* private fields */ }
Expand description

The actual group.

Implementations§

Source§

impl<Domain, G> Group<Domain, G>
where Domain: Eq + Hash + Clone, G: GroupElement + GroupAction<Domain = Domain> + PartialEq,

Source

pub fn new(gset: Vec<Domain>, generators: Vec<G>) -> Group<Domain, G>

Creates a group with a given set of generators on a certain gset.

Source

pub fn size(&self) -> usize

The order of the group, i.e. the number of elements this group has.

Source

pub fn is_member(&self, element: G) -> bool

Determine if a group element is a member of this group.

Source

pub fn strip(&self, element: G) -> G

Strip element with current group

Trait Implementations§

Source§

impl<Domain, G> Display for Group<Domain, G>
where Domain: Eq + Hash + Clone + Display, G: GroupElement + GroupAction<Domain = Domain> + PartialEq + Display,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Domain, G> Freeze for Group<Domain, G>

§

impl<Domain, G> RefUnwindSafe for Group<Domain, G>
where Domain: RefUnwindSafe, G: RefUnwindSafe,

§

impl<Domain, G> Send for Group<Domain, G>
where Domain: Send, G: Send,

§

impl<Domain, G> Sync for Group<Domain, G>
where Domain: Sync, G: Sync,

§

impl<Domain, G> Unpin for Group<Domain, G>
where Domain: Unpin, G: Unpin,

§

impl<Domain, G> UnwindSafe for Group<Domain, G>
where Domain: UnwindSafe, G: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.