Module easy_ml::matrices::views

source ·
Expand description

Generic views into a matrix.

The concept of a view into a matrix is built from the low level MatrixRef and MatrixMut traits which define having read and read/write access to Matrix data respectively, and the high level API implemented on the MatrixView struct.

Since a Matrix is itself a MatrixRef, the APIs for the traits are purposefully verbose to avoid name clashes with methods defined on the Matrix and MatrixView types. You should typically use MatrixRef and MatrixMut implementations via the MatrixView struct which provides an API closely resembling Matrix.

§Examples

Using trait objects with MatrixViews

Modules§

Structs§

  • A range bounded between start inclusive and start + length exclusive.
  • A mutably borrowed part of a matrix.
  • Four parts of a Matrix which can be mutated individually.
  • A 2 dimensional range over a matrix, hiding the rest of the matrix data from view.
  • A view into some or all of a matrix.

Enums§

Traits§

  • A unique/mutable reference to a matrix (or a portion of it) of some type.
  • A shared/immutable reference to a matrix (or a portion of it) of some type.
  • A marker trait that promises that the implementing type does not permit interior mutability.