pub trait ArrayHyperbolic<N: Numeric>where
    Self: Sized + Clone,{
    // Required methods
    fn sinh(&self) -> Result<Array<N>, ArrayError>;
    fn cosh(&self) -> Result<Array<N>, ArrayError>;
    fn tanh(&self) -> Result<Array<N>, ArrayError>;
    fn asinh(&self) -> Result<Array<N>, ArrayError>;
    fn acosh(&self) -> Result<Array<N>, ArrayError>;
    fn atanh(&self) -> Result<Array<N>, ArrayError>;
}
Expand description

ArrayTrait - Array Hyperbolic functions

Required Methods§

source

fn sinh(&self) -> Result<Array<N>, ArrayError>

Compute the hyperbolic sine of array elements

Examples
use arr_rs::prelude::*;

let arr = Array::flat(vec![-1., 0., 1.]).unwrap();
assert_eq!(Array::flat(vec![-1.1752011936438014, 0., 1.1752011936438014]), arr.sinh());
source

fn cosh(&self) -> Result<Array<N>, ArrayError>

Compute the hyperbolic cosine of array elements

Examples
use arr_rs::prelude::*;

let arr = Array::flat(vec![-1., 0., 1.]).unwrap();
assert_eq!(Array::flat(vec![1.5430806348152437, 1., 1.5430806348152437]), arr.cosh());
source

fn tanh(&self) -> Result<Array<N>, ArrayError>

Compute the hyperbolic tangent of array elements

Examples
use arr_rs::prelude::*;

let arr = Array::flat(vec![-1., 0., 1.]).unwrap();
assert_eq!(Array::flat(vec![-0.7615941559557649, 0., 0.7615941559557649]), arr.tanh());
source

fn asinh(&self) -> Result<Array<N>, ArrayError>

Compute the inverse hyperbolic sine of array elements

Examples
use arr_rs::prelude::*;

let arr = Array::flat(vec![-1., 0., 1.]).unwrap();
assert_eq!(Array::flat(vec![-0.881373587019543, 0., 0.881373587019543]), arr.asinh());
source

fn acosh(&self) -> Result<Array<N>, ArrayError>

Compute the inverse hyperbolic cosine of array elements

Examples
use arr_rs::prelude::*;

let arr = Array::flat(vec![1., 2., 3.]).unwrap();
assert_eq!(Array::flat(vec![0., 1.3169578969248166, 1.762747174039086]), arr.acosh());
source

fn atanh(&self) -> Result<Array<N>, ArrayError>

Compute the inverse hyperbolic tangent of array elements

Examples
use arr_rs::prelude::*;

let arr = Array::flat(vec![-1., 0., 1.]).unwrap();
assert_eq!(Array::flat(vec![-f64::INFINITY, 0., f64::INFINITY]), arr.atanh());

Implementations on Foreign Types§

source§

impl<N: Numeric> ArrayHyperbolic<N> for Result<Array<N>, ArrayError>

Implementors§