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