@@ -5,7 +5,7 @@ use cauchy::*;
5
5
use num_traits:: { ToPrimitive , Zero } ;
6
6
7
7
/// Result of LeastSquares
8
- pub struct LeastSquaresOutput < A : Scalar > {
8
+ pub struct LeastSquaresOwned < A : Scalar > {
9
9
/// singular values
10
10
pub singular_values : Vec < A :: Real > ,
11
11
/// The rank of the input matrix A
@@ -21,7 +21,7 @@ pub trait LeastSquaresSvdDivideConquer_: Scalar {
21
21
a_layout : MatrixLayout ,
22
22
a : & mut [ Self ] ,
23
23
b : & mut [ Self ] ,
24
- ) -> Result < LeastSquaresOutput < Self > > ;
24
+ ) -> Result < LeastSquaresOwned < Self > > ;
25
25
26
26
/// Solve least square problems $\argmin_X \| AX - B\|$
27
27
fn least_squares_nrhs (
@@ -46,7 +46,7 @@ macro_rules! impl_least_squares {
46
46
l: MatrixLayout ,
47
47
a: & mut [ Self ] ,
48
48
b: & mut [ Self ] ,
49
- ) -> Result <LeastSquaresOutput <Self >> {
49
+ ) -> Result <LeastSquaresOwned <Self >> {
50
50
let b_layout = l. resized( b. len( ) as i32 , 1 ) ;
51
51
Self :: least_squares_nrhs( l, a, b_layout, b)
52
52
}
@@ -56,7 +56,7 @@ macro_rules! impl_least_squares {
56
56
a: & mut [ Self ] ,
57
57
b_layout: MatrixLayout ,
58
58
b: & mut [ Self ] ,
59
- ) -> Result <LeastSquaresOutput <Self >> {
59
+ ) -> Result <LeastSquaresOwned <Self >> {
60
60
// Minimize |b - Ax|_2
61
61
//
62
62
// where
@@ -160,7 +160,7 @@ macro_rules! impl_least_squares {
160
160
transpose_over( b_layout, & b_t, b) ;
161
161
}
162
162
163
- Ok ( LeastSquaresOutput {
163
+ Ok ( LeastSquaresOwned {
164
164
singular_values,
165
165
rank,
166
166
} )
0 commit comments