pub trait Matrix: AsRef<[Self::R]> {
type MatElement;
type R: Row<Element = Self::MatElement>;
// Required methods
fn dimension(&self) -> (usize, usize);
fn fits(&self, row: usize, col: usize) -> bool;
// Provided methods
fn get_row(&self, row_idx: usize) -> impl Iterator<Item = &Self::MatElement> { ... }
fn get_row_slice(&self, row_idx: usize) -> &[Self::MatElement] { ... }
fn iter_rows(&self) -> impl Iterator<Item = &Self::R> { ... }
fn get(&self, row_idx: usize, column_idx: usize) -> &Self::MatElement { ... }
fn split_at_row(
&self,
idx: usize,
) -> (&[<Self as Matrix>::R], &[<Self as Matrix>::R]) { ... }
}Required Associated Types§
type MatElement
type R: Row<Element = Self::MatElement>
Required Methods§
Provided Methods§
fn get_row(&self, row_idx: usize) -> impl Iterator<Item = &Self::MatElement>
fn get_row_slice(&self, row_idx: usize) -> &[Self::MatElement]
fn iter_rows(&self) -> impl Iterator<Item = &Self::R>
fn get(&self, row_idx: usize, column_idx: usize) -> &Self::MatElement
fn split_at_row( &self, idx: usize, ) -> (&[<Self as Matrix>::R], &[<Self as Matrix>::R])
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.