Skip to content

Commit 9613cfe

Browse files
authored
Merge pull request #232 from rust-ndarray/least-square-lax-trait
Add LeastSquaresSvdDivideConquer_ into Lapack trait
2 parents ee4fcb8 + 3c951ff commit 9613cfe

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

lax/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ pub trait Lapack:
107107
+ Eigh_
108108
+ Triangular_
109109
+ Tridiagonal_
110+
+ LeastSquaresSvdDivideConquer_
110111
{
111112
}
112113

ndarray-linalg/src/least_squares.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ where
152152
/// valid representation for `ArrayBase`.
153153
impl<E, D> LeastSquaresSvd<D, E, Ix1> for ArrayBase<D, Ix2>
154154
where
155-
E: Scalar + Lapack + LeastSquaresSvdDivideConquer_,
155+
E: Scalar + Lapack,
156156
D: Data<Elem = E>,
157157
{
158158
/// Solve a least squares problem of the form `Ax = rhs`
@@ -175,7 +175,7 @@ where
175175
/// valid representation for `ArrayBase`.
176176
impl<E, D> LeastSquaresSvd<D, E, Ix2> for ArrayBase<D, Ix2>
177177
where
178-
E: Scalar + Lapack + LeastSquaresSvdDivideConquer_,
178+
E: Scalar + Lapack,
179179
D: Data<Elem = E>,
180180
{
181181
/// Solve a least squares problem of the form `Ax = rhs`
@@ -200,7 +200,7 @@ where
200200
/// valid representation for `ArrayBase`.
201201
impl<E, D> LeastSquaresSvdInto<D, E, Ix1> for ArrayBase<D, Ix2>
202202
where
203-
E: Scalar + Lapack + LeastSquaresSvdDivideConquer_,
203+
E: Scalar + Lapack,
204204
D: DataMut<Elem = E>,
205205
{
206206
/// Solve a least squares problem of the form `Ax = rhs`
@@ -226,7 +226,7 @@ where
226226
/// valid representation for `ArrayBase`.
227227
impl<E, D> LeastSquaresSvdInto<D, E, Ix2> for ArrayBase<D, Ix2>
228228
where
229-
E: Scalar + Lapack + LeastSquaresSvdDivideConquer_,
229+
E: Scalar + Lapack,
230230
D: DataMut<Elem = E>,
231231
{
232232
/// Solve a least squares problem of the form `Ax = rhs`
@@ -366,7 +366,7 @@ fn compute_least_squares_nrhs<E, D1, D2>(
366366
rhs: &mut ArrayBase<D2, Ix2>,
367367
) -> Result<LeastSquaresResult<E, Ix2>>
368368
where
369-
E: Scalar + Lapack + LeastSquaresSvdDivideConquer_,
369+
E: Scalar + Lapack,
370370
D1: DataMut<Elem = E>,
371371
D2: DataMut<Elem = E>,
372372
{
@@ -376,7 +376,7 @@ where
376376
singular_values,
377377
rank,
378378
} = unsafe {
379-
<E as LeastSquaresSvdDivideConquer_>::least_squares_nrhs(
379+
E::least_squares_nrhs(
380380
a_layout,
381381
a.as_allocated_mut()?,
382382
rhs_layout,

0 commit comments

Comments
 (0)