From 1a7f0dea9fd8b3aa044caf01181d99f124b7c104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Fri, 2 Feb 2018 12:26:11 +0100 Subject: [PATCH] Add column vector slice aliases. --- src/core/alias_slice.rs | 42 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/core/alias_slice.rs b/src/core/alias_slice.rs index b9f6aaa7..243a32fa 100644 --- a/src/core/alias_slice.rs +++ b/src/core/alias_slice.rs @@ -126,6 +126,28 @@ pub type MatrixSliceXx5<'a, N, RStride = U1, CStride = Dynamic> = MatrixSliceMN pub type MatrixSliceXx6<'a, N, RStride = U1, CStride = Dynamic> = MatrixSliceMN<'a, N, Dynamic, U6, RStride, CStride>; + +/// A column vector slice with `D` rows. +pub type VectorSliceN<'a, N, D, Stride = U1> = Matrix>; + +/// A column vector slice dynamic numbers of rows and columns. +pub type DVectorSlice<'a, N, Stride = U1> = VectorSliceN<'a, N, Dynamic, Stride>; + +/// A 1D column vector slice. +pub type VectorSlice1<'a, N, Stride = U1> = VectorSliceN<'a, N, U1, Stride>; +/// A 2D column vector slice. +pub type VectorSlice2<'a, N, Stride = U1> = VectorSliceN<'a, N, U2, Stride>; +/// A 3D column vector slice. +pub type VectorSlice3<'a, N, Stride = U1> = VectorSliceN<'a, N, U3, Stride>; +/// A 4D column vector slice. +pub type VectorSlice4<'a, N, Stride = U1> = VectorSliceN<'a, N, U4, Stride>; +/// A 5D column vector slice. +pub type VectorSlice5<'a, N, Stride = U1> = VectorSliceN<'a, N, U5, Stride>; +/// A 6D column vector slice. +pub type VectorSlice6<'a, N, Stride = U1> = VectorSliceN<'a, N, U6, Stride>; + + + /* * * @@ -248,3 +270,23 @@ pub type MatrixSliceMutXx4<'a, N, RStride = U1, CStride = Dynamic> = MatrixSlice pub type MatrixSliceMutXx5<'a, N, RStride = U1, CStride = Dynamic> = MatrixSliceMutMN<'a, N, Dynamic, U5, RStride, CStride>; /// A column-major mutable matrix slice with a number of rows chosen at runtime and 6 columns. pub type MatrixSliceMutXx6<'a, N, RStride = U1, CStride = Dynamic> = MatrixSliceMutMN<'a, N, Dynamic, U6, RStride, CStride>; + + +/// A mutable column vector slice with `D` rows. +pub type VectorSliceMutN<'a, N, D, Stride = U1> = Matrix>; + +/// A mutable column vector slice dynamic numbers of rows and columns. +pub type DVectorSliceMut<'a, N, Stride = U1> = VectorSliceMutN<'a, N, Dynamic, Stride>; + +/// A 1D mutable column vector slice. +pub type VectorSliceMut1<'a, N, Stride = U1> = VectorSliceMutN<'a, N, U1, Stride>; +/// A 2D mutable column vector slice. +pub type VectorSliceMut2<'a, N, Stride = U1> = VectorSliceMutN<'a, N, U2, Stride>; +/// A 3D mutable column vector slice. +pub type VectorSliceMut3<'a, N, Stride = U1> = VectorSliceMutN<'a, N, U3, Stride>; +/// A 4D mutable column vector slice. +pub type VectorSliceMut4<'a, N, Stride = U1> = VectorSliceMutN<'a, N, U4, Stride>; +/// A 5D mutable column vector slice. +pub type VectorSliceMut5<'a, N, Stride = U1> = VectorSliceMutN<'a, N, U5, Stride>; +/// A 6D mutable column vector slice. +pub type VectorSliceMut6<'a, N, Stride = U1> = VectorSliceMutN<'a, N, U6, Stride>;