File tree Expand file tree Collapse file tree 3 files changed +20
-17
lines changed Expand file tree Collapse file tree 3 files changed +20
-17
lines changed Original file line number Diff line number Diff line change @@ -56,3 +56,21 @@ pub enum Transpose {
5656 Transpose = b'T' ,
5757 Hermite = b'C' ,
5858}
59+
60+ #[ derive( Debug , Clone , Copy ) ]
61+ #[ repr( u8 ) ]
62+ pub enum NormType {
63+ One = b'O' ,
64+ Infinity = b'I' ,
65+ Frobenius = b'F' ,
66+ }
67+
68+ impl NormType {
69+ pub ( crate ) fn transpose ( self ) -> Self {
70+ match self {
71+ NormType :: One => NormType :: Infinity ,
72+ NormType :: Infinity => NormType :: One ,
73+ NormType :: Frobenius => NormType :: Frobenius ,
74+ }
75+ }
76+ }
Original file line number Diff line number Diff line change @@ -6,22 +6,7 @@ use lapack::c::Layout::ColumnMajor as cm;
66use layout:: MatrixLayout ;
77use types:: * ;
88
9- #[ repr( u8 ) ]
10- pub enum NormType {
11- One = b'O' ,
12- Infinity = b'I' ,
13- Frobenius = b'F' ,
14- }
15-
16- impl NormType {
17- fn transpose ( self ) -> Self {
18- match self {
19- NormType :: One => NormType :: Infinity ,
20- NormType :: Infinity => NormType :: One ,
21- NormType :: Frobenius => NormType :: Frobenius ,
22- }
23- }
24- }
9+ use super :: NormType ;
2510
2611pub trait OperatorNorm_ : AssociatedReal {
2712 unsafe fn opnorm ( NormType , MatrixLayout , & [ Self ] ) -> Self :: Real ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use num_traits::Zero;
88use types:: * ;
99
1010use super :: { Pivot , Transpose , into_result} ;
11- use super :: opnorm :: NormType ;
11+ use super :: NormType ;
1212
1313/// Wraps `*getrf`, `*getri`, and `*getrs`
1414pub trait Solve_ : AssociatedReal + Sized {
You can’t perform that action at this time.
0 commit comments