Skip to content

Commit 3ee3131

Browse files
committed
Change opnorm(One) to opnorm_one()
1 parent 17f66b7 commit 3ee3131

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/solve.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ use ndarray::*;
4949

5050
use super::convert::*;
5151
use super::error::*;
52-
use super::lapack_traits::opnorm::NormType;
5352
use super::layout::*;
5453
use super::opnorm::OperationNorm;
5554
use super::types::*;
@@ -428,8 +427,8 @@ pub trait ReciprocalConditionNum<A: Scalar> {
428427
/// 1-norm.
429428
///
430429
/// This method uses the LAPACK `*gecon` routines, which *estimate*
431-
/// `self.inv().opnorm(One)` and then compute `rcond = 1. /
432-
/// (self.opnorm(One) * self.inv().opnorm(One))`.
430+
/// `self.inv().opnorm_one()` and then compute `rcond = 1. /
431+
/// (self.opnorm_one() * self.inv().opnorm_one())`.
433432
///
434433
/// * If `rcond` is near `0.`, the matrix is badly conditioned.
435434
/// * If `rcond` is near `1.`, the matrix is well conditioned.
@@ -442,8 +441,8 @@ pub trait ReciprocalConditionNumInto<A: Scalar> {
442441
/// 1-norm.
443442
///
444443
/// This method uses the LAPACK `*gecon` routines, which *estimate*
445-
/// `self.inv().opnorm(One)` and then compute `rcond = 1. /
446-
/// (self.opnorm(One) * self.inv().opnorm(One))`.
444+
/// `self.inv().opnorm_one()` and then compute `rcond = 1. /
445+
/// (self.opnorm_one() * self.inv().opnorm_one())`.
447446
///
448447
/// * If `rcond` is near `0.`, the matrix is badly conditioned.
449448
/// * If `rcond` is near `1.`, the matrix is well conditioned.
@@ -460,7 +459,7 @@ where
460459
A::rcond(
461460
self.a.layout()?,
462461
self.a.as_allocated()?,
463-
self.a.opnorm(NormType::One)?,
462+
self.a.opnorm_one()?,
464463
)
465464
}
466465
}

tests/solve.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ extern crate num_traits;
55

66
use ndarray::*;
77
use ndarray_linalg::*;
8-
use ndarray_linalg::lapack_traits::opnorm::NormType;
98

109
#[test]
1110
fn solve_random() {
@@ -30,7 +29,7 @@ fn rcond() {
3029
macro_rules! rcond {
3130
($elem:ty, $rows:expr, $atol:expr) => {
3231
let a: Array2<$elem> = random(($rows, $rows));
33-
let rcond = 1. / (a.opnorm(NormType::One).unwrap() * a.inv().unwrap().opnorm(NormType::One).unwrap());
32+
let rcond = 1. / (a.opnorm_one().unwrap() * a.inv().unwrap().opnorm_one().unwrap());
3433
assert_aclose!(a.rcond().unwrap(), rcond, $atol);
3534
assert_aclose!(a.rcond_into().unwrap(), rcond, $atol);
3635
}

0 commit comments

Comments
 (0)