sinhm

Function sinhm 

Source
pub fn sinhm<F>(a: &ArrayView2<'_, F>) -> LinalgResult<Array2<F>>
where F: Float + NumAssign + Sum + One + Send + Sync + ScalarOperand + 'static,
Expand description

Compute the matrix hyperbolic sine.

The matrix hyperbolic sine is computed using: sinh(A) = (exp(A) - exp(-A)) / 2

For efficiency, this can also be computed using the series expansion: sinh(A) = A + A³/3! + A⁵/5! + A⁷/7! + …

§Arguments

  • a - Input square matrix

§Returns

  • Matrix hyperbolic sine of a

§Examples

use scirs2_core::ndarray::array;
use scirs2_linalg::matrix_functions::sinhm;

let a = array![[0.0_f64, 1.0], [1.0, 0.0]];
let sinh_a = sinhm(&a.view()).unwrap();