From 24bb7bef76114710e0238a3c131c0e541277dbc4 Mon Sep 17 00:00:00 2001 From: haibane_tenshi Date: Thu, 16 Dec 2021 18:50:15 +0300 Subject: [PATCH 1/2] fix(Matrix): relax T: Zero bound on Matrix::select_rows() and Matrix::select_columns() --- src/base/edition.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/base/edition.rs b/src/base/edition.rs index 45ba1846..760b3950 100644 --- a/src/base/edition.rs +++ b/src/base/edition.rs @@ -14,7 +14,7 @@ use crate::base::{DefaultAllocator, Matrix, OMatrix, RowVector, Scalar, Vector}; use crate::{Storage, UninitMatrix}; use std::mem::MaybeUninit; -/// # Rows and columns extraction +/// # Triangular matrix extraction impl> Matrix { /// Extracts the upper triangular part of this matrix (including the diagonal). #[inline] @@ -41,7 +41,10 @@ impl> Matrix { res } +} +/// # Rows and columns extraction +impl> Matrix { /// Creates a new matrix by extracting the given set of rows from `self`. #[cfg(any(feature = "std", feature = "alloc"))] #[must_use] From a6007de409c879d5444d4165224141147846bf49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Thu, 30 Dec 2021 21:55:29 +0100 Subject: [PATCH 2/2] Add "Triangular matrix extraction" bullet to Matrix documentation --- src/base/matrix.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base/matrix.rs b/src/base/matrix.rs index 5df2f78e..a6144ffd 100644 --- a/src/base/matrix.rs +++ b/src/base/matrix.rs @@ -92,6 +92,7 @@ pub type MatrixCross = /// - [Interpolation `lerp`, `slerp`…](#interpolation) /// - [BLAS functions `gemv`, `gemm`, `syger`…](#blas-functions) /// - [Swizzling `xx`, `yxz`…](#swizzling) +/// - [Triangular matrix extraction `upper_triangle`, `lower_triangle`](#triangular-matrix-extraction) /// /// #### Statistics /// - [Common operations `row_sum`, `column_mean`, `variance`…](#common-statistics-operations)