3737//! This `S` for a matrix `A` is called "leading dimension of the array A" in LAPACK document, and denoted by `lda`.
3838//!
3939
40- pub type LDA = i32 ;
41- pub type LEN = i32 ;
42- pub type Col = i32 ;
43- pub type Row = i32 ;
44-
4540#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
4641pub enum MatrixLayout {
4742 C { row : i32 , lda : i32 } ,
4843 F { col : i32 , lda : i32 } ,
4944}
5045
5146impl MatrixLayout {
52- pub fn size ( & self ) -> ( Row , Col ) {
47+ pub fn size ( & self ) -> ( i32 , i32 ) {
5348 match * self {
5449 MatrixLayout :: C { row, lda } => ( row, lda) ,
5550 MatrixLayout :: F { col, lda } => ( lda, col) ,
5651 }
5752 }
5853
59- pub fn resized ( & self , row : Row , col : Col ) -> MatrixLayout {
54+ pub fn resized ( & self , row : i32 , col : i32 ) -> MatrixLayout {
6055 match * self {
6156 MatrixLayout :: C { .. } => MatrixLayout :: C { row, lda : col } ,
6257 MatrixLayout :: F { .. } => MatrixLayout :: F { col, lda : row } ,
6358 }
6459 }
6560
66- pub fn lda ( & self ) -> LDA {
61+ pub fn lda ( & self ) -> i32 {
6762 std:: cmp:: max (
6863 1 ,
6964 match * self {
@@ -72,7 +67,7 @@ impl MatrixLayout {
7267 )
7368 }
7469
75- pub fn len ( & self ) -> LEN {
70+ pub fn len ( & self ) -> i32 {
7671 match * self {
7772 MatrixLayout :: C { row, .. } => row,
7873 MatrixLayout :: F { col, .. } => col,
0 commit comments