Module extendr_api::prelude::mat
source · Expand description
Matrix type.
Structs§
- Heap allocated resizable matrix, similar to a 2D
Vec. - Mutable view over a matrix, similar to a mutable reference to a 2D strided slice.
- Immutable view over a matrix, similar to an immutable reference to a 2D strided slice.
Traits§
- Trait for types that can be converted to a 2D matrix view.
- Trait for types that can be converted to a mutable 2D matrix view.
- Trait for types that can be converted to a mutable matrix view.
- Trait for types that can be converted to a matrix view.
- Represents a type that can be used to slice a matrix, such as an index or a range of indices.
Functions§
- Creates a
MatReffrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a column-major format, so that the first chunk ofnrowsvalues from the slices goes in the first column of the matrix, the second chunk ofnrowsvalues goes in the second column, and so on. - Creates a
MatReffrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a column-major format, so that the first chunk ofnrowsvalues from the slices goes in the first column of the matrix, the second chunk ofnrowsvalues goes in the second column, and so on. - Creates a
MatMutfrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a column-major format, so that the first chunk ofnrowsvalues from the slices goes in the first column of the matrix, the second chunk ofnrowsvalues goes in the second column, and so on. - Creates a
MatMutfrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a column-major format, so that the first chunk ofnrowsvalues from the slices goes in the first column of the matrix, the second chunk ofnrowsvalues goes in the second column, and so on. - Creates a
MatReffrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a column-major format, where the beginnings of two consecutive columns are separated bycol_strideelements. - Creates a
MatReffrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a column-major format, where the beginnings of two consecutive columns are separated bycol_strideelements. - Creates a
MatMutfrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a column-major format, where the beginnings of two consecutive columns are separated bycol_strideelements. - Creates a
MatMutfrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a column-major format, where the beginnings of two consecutive columns are separated bycol_strideelements. - Returns a view over a
1×1matrix containing value as its only element, pointing tovalue. - Returns a view over a
1×1matrix containing value as its only element, pointing tovalue. - Creates a
MatReffrom pointers to the matrix data, dimensions, and strides. - Creates a
MatMutfrom pointers to the matrix data, dimensions, and strides. - Returns a view over a
1×1matrix containing value as its only element, pointing tovalue. - Returns a view over a
1×1matrix containing value as its only element, pointing tovalue. - Returns a view over a matrix containing
colrepeatedncolstimes. - Returns a view over an
nrows×ncolsmatrix containingvaluerepeated for all elements. - Returns a view over an
nrows×ncolsmatrix containingvaluerepeated for all elements. - Returns a view over a matrix containing
rowrepeatednrowstimes. - Creates a
MatReffrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a row-major format, so that the first chunk ofncolsvalues from the slices goes in the first column of the matrix, the second chunk ofncolsvalues goes in the second column, and so on. - Creates a
MatReffrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a row-major format, so that the first chunk ofncolsvalues from the slices goes in the first column of the matrix, the second chunk ofncolsvalues goes in the second column, and so on. - Creates a
MatMutfrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a row-major format, so that the first chunk ofncolsvalues from the slices goes in the first column of the matrix, the second chunk ofncolsvalues goes in the second column, and so on. - Creates a
MatMutfrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a row-major format, so that the first chunk ofncolsvalues from the slices goes in the first column of the matrix, the second chunk ofncolsvalues goes in the second column, and so on. - Creates a
MatReffrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a row-major format, where the beginnings of two consecutive rows are separated byrow_strideelements. - Creates a
MatReffrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a row-major format, where the beginnings of two consecutive rows are separated byrow_strideelements. - Creates a
MatMutfrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a row-major format, where the beginnings of two consecutive rows are separated byrow_strideelements. - Creates a
MatMutfrom slice views over the matrix data, and the matrix dimensions. The data is interpreted in a row-major format, where the beginnings of two consecutive rows are separated byrow_strideelements.