use crate::{ MatrixExt, MatrixMutExt };
pub trait SwapsDimensions: MatrixMutExt {
fn swap_dimensions(&mut self);
}
pub trait MatrixExtFromIter<A> {
fn from_iter<I>(into_iter: I, columns: usize) -> Self
where I: IntoIterator<Item = A>,
<I as IntoIterator>::IntoIter: ExactSizeIterator;
}
pub trait InPlace<M: MatrixMutExt>: Sized {
fn in_place(&self, m: &mut M);
}
pub trait TransformStrategy<M: MatrixExt> {
type Output;
fn out_of(&self, m: M) -> Self::Output;
}
pub trait AccessStrategy<M: MatrixExt> {
fn access(&self, m: &M, i: usize, j: usize) -> Option<(usize, usize)>;
fn nrows(&self, m: &M) -> usize;
fn ncols(&self, m: &M) -> usize;
}