Skip to main content

MatrixUnary

Trait MatrixUnary 

Source
pub trait MatrixUnary: NDArray + Debug {
    type Diag: Access<Self::DType>;
    type Transpose: Access<Self::DType>;

    // Required methods
    fn mt(
        self,
    ) -> Result<Array<Self::DType, Self::Transpose, Self::Platform>, Error>;
    fn diag(
        self,
    ) -> Result<Array<Self::DType, Self::Diag, Self::Platform>, Error>;
}
Expand description

Matrix unary operations

Required Associated Types§

Required Methods§

Source

fn mt( self, ) -> Result<Array<Self::DType, Self::Transpose, Self::Platform>, Error>

Transpose a matrix or batch of matrices (i.e., transpose the last two dimensions).

Source

fn diag(self) -> Result<Array<Self::DType, Self::Diag, Self::Platform>, Error>

Construct an operation to read the diagonal(s) of this matrix or batch of matrices. This will return an error if the last two dimensions of the batch are unequal.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§