@@ -8,11 +8,10 @@ use lapack::c::Layout;
8
8
use super :: error:: { LinalgError , StrideError } ;
9
9
use super :: impls:: qr:: ImplQR ;
10
10
use super :: impls:: svd:: ImplSVD ;
11
- use super :: impls:: opnorm:: ImplOpNorm ;
12
11
use super :: impls:: solve:: ImplSolve ;
13
12
14
- pub trait MFloat : ImplQR + ImplSVD + ImplOpNorm + ImplSolve + NdFloat { }
15
- impl < A : ImplQR + ImplSVD + ImplOpNorm + ImplSolve + NdFloat > MFloat for A { }
13
+ pub trait MFloat : ImplQR + ImplSVD + ImplSolve + NdFloat { }
14
+ impl < A : ImplQR + ImplSVD + ImplSolve + NdFloat > MFloat for A { }
16
15
17
16
/// Methods for general matrices
18
17
pub trait Matrix : Sized {
@@ -23,12 +22,6 @@ pub trait Matrix: Sized {
23
22
fn size ( & self ) -> ( usize , usize ) ;
24
23
/// Layout (C/Fortran) of matrix
25
24
fn layout ( & self ) -> Result < Layout , StrideError > ;
26
- /// Operator norm for L-1 norm
27
- fn opnorm_1 ( & self ) -> Self :: Scalar ;
28
- /// Operator norm for L-inf norm
29
- fn opnorm_i ( & self ) -> Self :: Scalar ;
30
- /// Frobenius norm
31
- fn opnorm_f ( & self ) -> Self :: Scalar ;
32
25
/// singular-value decomposition (SVD)
33
26
fn svd ( self ) -> Result < ( Self , Self :: Vector , Self ) , LinalgError > ;
34
27
/// QR decomposition
@@ -84,28 +77,6 @@ impl<A: MFloat> Matrix for Array<A, Ix2> {
84
77
fn layout ( & self ) -> Result < Layout , StrideError > {
85
78
check_layout ( self . strides ( ) )
86
79
}
87
- fn opnorm_1 ( & self ) -> Self :: Scalar {
88
- let ( m, n) = self . size ( ) ;
89
- let strides = self . strides ( ) ;
90
- if strides[ 0 ] > strides[ 1 ] {
91
- ImplOpNorm :: opnorm_i ( n, m, self . clone ( ) . into_raw_vec ( ) )
92
- } else {
93
- ImplOpNorm :: opnorm_1 ( m, n, self . clone ( ) . into_raw_vec ( ) )
94
- }
95
- }
96
- fn opnorm_i ( & self ) -> Self :: Scalar {
97
- let ( m, n) = self . size ( ) ;
98
- let strides = self . strides ( ) ;
99
- if strides[ 0 ] > strides[ 1 ] {
100
- ImplOpNorm :: opnorm_1 ( n, m, self . clone ( ) . into_raw_vec ( ) )
101
- } else {
102
- ImplOpNorm :: opnorm_i ( m, n, self . clone ( ) . into_raw_vec ( ) )
103
- }
104
- }
105
- fn opnorm_f ( & self ) -> Self :: Scalar {
106
- let ( m, n) = self . size ( ) ;
107
- ImplOpNorm :: opnorm_f ( m, n, self . clone ( ) . into_raw_vec ( ) )
108
- }
109
80
fn svd ( self ) -> Result < ( Self , Self :: Vector , Self ) , LinalgError > {
110
81
let ( n, m) = self . size ( ) ;
111
82
let layout = self . layout ( ) ?;
@@ -192,18 +163,6 @@ impl<A: MFloat> Matrix for RcArray<A, Ix2> {
192
163
fn layout ( & self ) -> Result < Layout , StrideError > {
193
164
check_layout ( self . strides ( ) )
194
165
}
195
- fn opnorm_1 ( & self ) -> Self :: Scalar {
196
- // XXX unnecessary clone
197
- self . to_owned ( ) . opnorm_1 ( )
198
- }
199
- fn opnorm_i ( & self ) -> Self :: Scalar {
200
- // XXX unnecessary clone
201
- self . to_owned ( ) . opnorm_i ( )
202
- }
203
- fn opnorm_f ( & self ) -> Self :: Scalar {
204
- // XXX unnecessary clone
205
- self . to_owned ( ) . opnorm_f ( )
206
- }
207
166
fn svd ( self ) -> Result < ( Self , Self :: Vector , Self ) , LinalgError > {
208
167
let ( u, s, v) = self . into_owned ( ) . svd ( ) ?;
209
168
Ok ( ( u. into_shared ( ) , s. into_shared ( ) , v. into_shared ( ) ) )
0 commit comments