From 4ec94408b5652e12b779df462479e15df8bc7f33 Mon Sep 17 00:00:00 2001 From: Fredrik Jansson Date: Fri, 3 Apr 2020 11:11:14 +0200 Subject: [PATCH] Pub use of exp in the linalg module --- src/linalg/exp.rs | 6 ++++-- src/linalg/mod.rs | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/linalg/exp.rs b/src/linalg/exp.rs index 7c087159..8822027b 100644 --- a/src/linalg/exp.rs +++ b/src/linalg/exp.rs @@ -1,3 +1,5 @@ +//! This module provides the matrix exponent (exp) function to square matrices. +//! use crate::{ base::{ allocator::Allocator, @@ -403,14 +405,14 @@ where DefaultAllocator: Allocator + Allocator<(usize, usize), DimMinimum> + Allocator, { - /// Computes exp of this matrix + /// Computes exponential of this matrix pub fn exp(&self) -> Self { // Simple case if self.nrows() == 1 { return self.clone().map(|v| v.exp()); } - let mut h = ExpmPadeHelper::new(self.clone(), false); + let mut h = ExpmPadeHelper::new(self.clone(), true); let eta_1 = N::max(h.d4_loose(), h.d6_loose()); if eta_1 < N::from_f64(1.495585217958292e-002).unwrap() && ell(&h.a, 3) == 0 { diff --git a/src/linalg/mod.rs b/src/linalg/mod.rs index 42bfde63..f96cef0c 100644 --- a/src/linalg/mod.rs +++ b/src/linalg/mod.rs @@ -27,6 +27,7 @@ mod symmetric_tridiagonal; pub use self::bidiagonal::*; pub use self::cholesky::*; pub use self::convolution::*; +pub use self::exp::*; pub use self::full_piv_lu::*; pub use self::hessenberg::*; pub use self::lu::*;