# [−][src]Trait alga::linear::Matrix

    pub trait Matrix: Sized + Clone + Mul<Self::Row, Output = Self::Column> {
        type Field: Field;
        type Row: FiniteDimVectorSpace<Field = Self::Field>;
        type Column: FiniteDimVectorSpace<Field = Self::Field>;
        type Transpose: Matrix<Field = Self::Field, Row = Self::Column, Column = Self::Row>;
        fn nrows(&self) -> usize;
        fn ncolumns(&self) -> usize;
        fn row(&self, i: usize) -> Self::Row;
        fn column(&self, i: usize) -> Self::Column;
        unsafe fn get_unchecked(&self, i: usize, j: usize) -> Self::Field;
        fn transpose(&self) -> Self::Transpose;

        fn get(&self, i: usize, j: usize) -> Self::Field { ... }
    }

The space of all matrices.

## Associated Types

### `type Field: Field`

The underlying field.

### `type Row: FiniteDimVectorSpace<Field = Self::Field>`

The type of rows of this matrix.

### `type Column: FiniteDimVectorSpace<Field = Self::Field>`

The type of columns of this matrix.

### `type Transpose: Matrix<Field = Self::Field, Row = Self::Column, Column = Self::Row>`

The type of the transposed matrix.

Loading content...

## Required methods

### `fn nrows(&self) -> usize`

The number of rows of this matrix.

### `fn ncolumns(&self) -> usize`

The number of columns of this matrix.

### `fn row(&self, i: usize) -> Self::Row`

The i-th row of this matrix.

### `fn column(&self, i: usize) -> Self::Column`

The i-th column of this matrix.

### `unsafe fn get_unchecked(&self, i: usize, j: usize) -> Self::Field`

Gets the component at row `i` and column `j` of this matrix without bound checking.

### `fn transpose(&self) -> Self::Transpose`

Transposes this matrix.

Loading content...

## Provided methods

### `fn get(&self, i: usize, j: usize) -> Self::Field`

Gets the component at row `i` and column `j` of this matrix.

Loading content...

## Implementors

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)