Trait ArrayMathSpecial

Source
pub trait ArrayMathSpecial<N: NumericOps>
where Self: Sized + Clone,
{ // Required methods fn i0(&self) -> Result<Array<N>, ArrayError>; fn sinc(&self) -> Result<Array<N>, ArrayError>; }
Expand description

ArrayTrait - Array Math Special functions

Required Methods§

Source

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

Modified Bessel function of the first kind, order 0

§Examples
use arr_rs::prelude::*;

let arr = Array::flat(vec![-2., 0., 3.5]);
assert_eq!(Array::flat(vec![2.2795851066228696, 0.9999999999999997, 7.378203432225479]), arr.i0());
§Errors

may returns ArrayError

Source

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

Return the normalized sinc function

§Examples
use arr_rs::prelude::*;

let arr = Array::flat(vec![-1., 0., 1.]);
assert_eq!(Array::flat(vec![3.898_171_832_519_375_5e-17, 1.0, 3.898_171_832_519_375_5e-17]), arr.sinc());
§Errors

may returns ArrayError

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<N: NumericOps> ArrayMathSpecial<N> for Result<Array<N>, ArrayError>

Source§

fn i0(&self) -> Self

Source§

fn sinc(&self) -> Self

Implementors§