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§
Required Methods§
sourcefn get_character(
&self,
irrep: &Self::RowSymbol,
class: &Self::ColSymbol,
) -> &Character
fn get_character( &self, irrep: &Self::RowSymbol, class: &Self::ColSymbol, ) -> &Character
sourcefn get_row(&self, row: &Self::RowSymbol) -> ArrayView1<'_, Character>
fn get_row(&self, row: &Self::RowSymbol) -> ArrayView1<'_, Character>
sourcefn get_col(&self, col: &Self::ColSymbol) -> ArrayView1<'_, Character>
fn get_col(&self, col: &Self::ColSymbol) -> ArrayView1<'_, Character>
sourcefn get_all_rows(&self) -> IndexSet<Self::RowSymbol>
fn get_all_rows(&self) -> IndexSet<Self::RowSymbol>
Retrieves the symbols of all rows in the character table.
sourcefn get_all_cols(&self) -> IndexSet<Self::ColSymbol>
fn get_all_cols(&self) -> IndexSet<Self::ColSymbol>
Retrieves the symbols of all columns in the character table.
sourcefn array(&self) -> &Array2<Character>
fn array(&self) -> &Array2<Character>
Returns a shared reference to the underlying array of the character table.
sourcefn get_principal_cols(&self) -> &IndexSet<Self::ColSymbol>
fn get_principal_cols(&self) -> &IndexSet<Self::ColSymbol>
Returns the principal columns of the character table.
sourcefn write_nice_table(
&self,
f: &mut Formatter<'_>,
compact: bool,
numerical: Option<usize>,
) -> Result
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. IfNone
, 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.