Trait arr_rs::math::operations::hyperbolic::ArrayHyperbolic
source · 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§
sourcefn sinh(&self) -> Result<Array<N>, ArrayError>
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());
sourcefn cosh(&self) -> Result<Array<N>, ArrayError>
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());
sourcefn tanh(&self) -> Result<Array<N>, ArrayError>
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());
sourcefn asinh(&self) -> Result<Array<N>, ArrayError>
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());