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 {
56
56
Transpose = b'T' ,
57
57
Hermite = b'C' ,
58
58
}
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;
6
6
use layout:: MatrixLayout ;
7
7
use types:: * ;
8
8
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 ;
25
10
26
11
pub trait OperatorNorm_ : AssociatedReal {
27
12
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;
8
8
use types:: * ;
9
9
10
10
use super :: { Pivot , Transpose , into_result} ;
11
- use super :: opnorm :: NormType ;
11
+ use super :: NormType ;
12
12
13
13
/// Wraps `*getrf`, `*getri`, and `*getrs`
14
14
pub trait Solve_ : AssociatedReal + Sized {
You can’t perform that action at this time.
0 commit comments