ndarray_linalg::layout

Trait AllocatedArray

source
pub trait AllocatedArray {
    type Elem;

    // Required methods
    fn layout(&self) -> Result<MatrixLayout>;
    fn square_layout(&self) -> Result<MatrixLayout>;
    fn ensure_square(&self) -> Result<()>;
    fn as_allocated(&self) -> Result<&[Self::Elem]>;
}

Required Associated Types§

Required Methods§

source

fn layout(&self) -> Result<MatrixLayout>

source

fn square_layout(&self) -> Result<MatrixLayout>

source

fn ensure_square(&self) -> Result<()>

Returns Ok iff the matrix is square (without computing the layout).

source

fn as_allocated(&self) -> Result<&[Self::Elem]>

Implementations on Foreign Types§

source§

impl<A, S> AllocatedArray for ArrayBase<S, Ix2>
where S: Data<Elem = A>,

Implementors§