Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

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

Source§

type RowSymbol = RowSymbol

Source§

type ColSymbol = ColSymbol

Source§

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