Trait qsym2::chartab::CharacterTable

source ·
pub trait CharacterTable: Clone{
    type RowSymbol;
    type ColSymbol;

    // Required methods
    fn get_character(
        &self,
        irrep: &Self::RowSymbol,
        class: &Self::ColSymbol,
    ) -> &Character;
    fn get_row(&self, row: &Self::RowSymbol) -> ArrayView1<'_, Character>;
    fn get_col(&self, col: &Self::ColSymbol) -> ArrayView1<'_, Character>;
    fn get_all_rows(&self) -> IndexSet<Self::RowSymbol>;
    fn get_all_cols(&self) -> IndexSet<Self::ColSymbol>;
    fn array(&self) -> &Array2<Character>;
    fn get_order(&self) -> usize;
    fn get_principal_cols(&self) -> &IndexSet<Self::ColSymbol>;
    fn write_nice_table(
        &self,
        f: &mut Formatter<'_>,
        compact: bool,
        numerical: Option<usize>,
    ) -> Result;
}
Expand description

Trait to contain essential methods for a character table.

Required Associated Types§

source

type RowSymbol

The type for the row-labelling symbols.

source

type ColSymbol

The type for the column-labelling symbols.

Required Methods§

source

fn get_character( &self, irrep: &Self::RowSymbol, class: &Self::ColSymbol, ) -> &Character

Retrieves the character of a particular irreducible representation in a particular conjugacy class.

§Arguments
  • irrep - A Mulliken irreducible representation symbol.
  • class - A conjugacy class symbol.
§Returns

The required character.

§Panics

Panics if the specified irrep or class cannot be found.

source

fn get_row(&self, row: &Self::RowSymbol) -> ArrayView1<'_, Character>

Retrieves the characters of all columns in a particular row.

§Arguments
  • row - A row-labelling symbol.
§Returns

The required characters.

source

fn get_col(&self, col: &Self::ColSymbol) -> ArrayView1<'_, Character>

Retrieves the characters of all rows in a particular column.

§Arguments
  • col - A column-labelling symbol.
§Returns

The required characters.

source

fn get_all_rows(&self) -> IndexSet<Self::RowSymbol>

Retrieves the symbols of all rows in the character table.

source

fn get_all_cols(&self) -> IndexSet<Self::ColSymbol>

Retrieves the symbols of all columns in the character table.

source

fn array(&self) -> &Array2<Character>

Returns a shared reference to the underlying array of the character table.

source

fn get_order(&self) -> usize

Retrieves the order of the group.

source

fn get_principal_cols(&self) -> &IndexSet<Self::ColSymbol>

Returns the principal columns of the character table.

source

fn write_nice_table( &self, f: &mut Formatter<'_>, compact: bool, numerical: Option<usize>, ) -> Result

Prints a nicely formatted character table.

§Arguments
  • compact - Flag indicating if the columns are compact with unequal widths or expanded with all equal widths.
  • numerical - An option containing a non-negative integer specifying the number of decimal places for the numerical forms of the characters. If None, the characters will be shown as exact algebraic forms.
§Returns

A formatted string containing the character table in a printable form.

§Errors

Returns an error when encountering any issue formatting the character table.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<RowSymbol, ColSymbol> CharacterTable for RepCharacterTable<RowSymbol, ColSymbol>
where RowSymbol: LinearSpaceSymbol, ColSymbol: CollectionSymbol,

§

type RowSymbol = RowSymbol

§

type ColSymbol = ColSymbol

source§

impl<RowSymbol, UC> CharacterTable for CorepCharacterTable<RowSymbol, UC>

§

type RowSymbol = RowSymbol

§

type ColSymbol = <UC as CharacterTable>::ColSymbol