bba1993e58
These warnings occurred only when running the test suite with no features. Lots of uses had to be rescoped into newly created modules to make it easier to separate these issues.
27 lines
673 B
Rust
27 lines
673 B
Rust
#![cfg(feature = "arbitrary")]
|
|
|
|
use std::cmp;
|
|
|
|
use na::{DMatrix, Matrix4};
|
|
use na::balancing;
|
|
|
|
quickcheck! {
|
|
fn balancing_parlett_reinsch(n: usize) -> bool {
|
|
let n = cmp::min(n, 10);
|
|
let m = DMatrix::<f64>::new_random(n, n);
|
|
let mut balanced = m.clone();
|
|
let d = balancing::balance_parlett_reinsch(&mut balanced);
|
|
balancing::unbalance(&mut balanced, &d);
|
|
|
|
balanced == m
|
|
}
|
|
|
|
fn balancing_parlett_reinsch_static(m: Matrix4<f64>) -> bool {
|
|
let mut balanced = m;
|
|
let d = balancing::balance_parlett_reinsch(&mut balanced);
|
|
balancing::unbalance(&mut balanced, &d);
|
|
|
|
balanced == m
|
|
}
|
|
}
|