Trait qsym2::group::GroupProperties
source · pub trait GroupPropertieswhere
Self::GroupElement: Mul<Output = Self::GroupElement> + Inv<Output = Self::GroupElement> + Hash + Eq + Clone + Sync + Debug + FiniteOrder,{
type GroupElement;
type ElementCollection: Clone + IntoIterator<Item = Self::GroupElement>;
// Required methods
fn name(&self) -> String;
fn finite_subgroup_name(&self) -> Option<&String>;
fn elements(&self) -> &Self::ElementCollection;
fn get_index(&self, index: usize) -> Option<Self::GroupElement>;
fn get_index_of(&self, g: &Self::GroupElement) -> Option<usize>;
fn contains(&self, g: &Self::GroupElement) -> bool;
fn is_abelian(&self) -> bool;
fn order(&self) -> usize;
fn cayley_table(&self) -> Option<&Array2<usize>>;
}
Expand description
Trait for purely group-theoretic properties.
Required Associated Types§
sourcetype GroupElement
type GroupElement
The type of the elements in the group.
type ElementCollection: Clone + IntoIterator<Item = Self::GroupElement>
Required Methods§
sourcefn finite_subgroup_name(&self) -> Option<&String>
fn finite_subgroup_name(&self) -> Option<&String>
Returns the finite subgroup name of this group, if any.
sourcefn elements(&self) -> &Self::ElementCollection
fn elements(&self) -> &Self::ElementCollection
Returns an iterable collection of the elements in the group.
sourcefn get_index(&self, index: usize) -> Option<Self::GroupElement>
fn get_index(&self, index: usize) -> Option<Self::GroupElement>
Given an index, returns the element associated with it, or None
if the index is out of
range.
sourcefn get_index_of(&self, g: &Self::GroupElement) -> Option<usize>
fn get_index_of(&self, g: &Self::GroupElement) -> Option<usize>
Given an element, returns its index in the group, or None
if the element does not exist
in the group.
sourcefn contains(&self, g: &Self::GroupElement) -> bool
fn contains(&self, g: &Self::GroupElement) -> bool
Checks if an element is a member of the group.
sourcefn is_abelian(&self) -> bool
fn is_abelian(&self) -> bool
Checks if this group is abelian.
sourcefn cayley_table(&self) -> Option<&Array2<usize>>
fn cayley_table(&self) -> Option<&Array2<usize>>
Returns the Cayley table of the group, if any.
Object Safety§
This trait is not object safe.