nalgebra/benches/lib.rs

25 lines
553 B
Rust
Raw Normal View History

#![feature(test)]
2017-08-16 00:24:34 +08:00
#![allow(unused_macros)]
2018-02-02 19:26:35 +08:00
extern crate nalgebra as na;
extern crate rand;
2018-02-02 19:26:35 +08:00
extern crate test;
extern crate typenum;
#[macro_use]
extern crate criterion;
use na::DMatrix;
2018-10-22 13:00:10 +08:00
use rand::{IsaacRng, Rng};
pub mod core;
pub mod geometry;
pub mod linalg;
fn reproductible_dmatrix(nrows: usize, ncols: usize) -> DMatrix<f64> {
2018-12-29 19:12:56 +08:00
use rand::SeedableRng;
let mut rng = IsaacRng::seed_from_u64(0);
DMatrix::<f64>::from_fn(nrows, ncols, |_, _| rng.gen())
}
criterion_main!(core::matrix::matrix, core::vector::vector, linalg::bidiagonal);