pub struct ExactNumArray { /* private fields */ }Expand description
Batch of ExactNum values at a shared precision p, row-major.
Implementations§
Source§impl ExactNumArray
impl ExactNumArray
Sourcepub fn write_bytes(&self, dest: &mut [u8]) -> Result<usize, Error>
pub fn write_bytes(&self, dest: &mut [u8]) -> Result<usize, Error>
Write the array record into dest without allocating.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<ExactNumArray, Error>
pub fn from_bytes(bytes: &[u8]) -> Result<ExactNumArray, Error>
Decode an array record. Shape product must match the element count.
Source§impl ExactNumArray
impl ExactNumArray
Sourcepub fn to_csv_string(&self) -> Result<String, Error>
pub fn to_csv_string(&self) -> Result<String, Error>
Encode each cell as Display@p=<bits>.
Sourcepub fn from_csv_str(text: &str) -> Result<ExactNumArray, Error>
pub fn from_csv_str(text: &str) -> Result<ExactNumArray, Error>
Parse CSV of Display / Display@p= cells. Empty → NaN.
Sourcepub fn from_csv<P>(path: P) -> Result<ExactNumArray, Error>
pub fn from_csv<P>(path: P) -> Result<ExactNumArray, Error>
Read Self::from_csv_str from path.
Source§impl ExactNumArray
impl ExactNumArray
Sourcepub fn new(p: usize) -> ExactNumArray
pub fn new(p: usize) -> ExactNumArray
Empty 0×0 array at precision p.
Sourcepub fn filled(p: usize, n: usize, fill: &ExactNum) -> ExactNumArray
pub fn filled(p: usize, n: usize, fill: &ExactNum) -> ExactNumArray
Row vector: n copies of fill (rounded to p).
Sourcepub fn filled_2d(
p: usize,
rows: usize,
cols: usize,
fill: &ExactNum,
) -> Option<ExactNumArray>
pub fn filled_2d( p: usize, rows: usize, cols: usize, fill: &ExactNum, ) -> Option<ExactNumArray>
rows×cols filled with fill (rounded to p).
Sourcepub fn from_values(p: usize, vals: &[ExactNum]) -> ExactNumArray
pub fn from_values(p: usize, vals: &[ExactNum]) -> ExactNumArray
From values as a row vector; each is rounded to p.
Sourcepub fn from_shape(
p: usize,
rows: usize,
cols: usize,
vals: &[ExactNum],
) -> Option<ExactNumArray>
pub fn from_shape( p: usize, rows: usize, cols: usize, vals: &[ExactNum], ) -> Option<ExactNumArray>
Row-major rows×cols. Length must be rows*cols.
Sourcepub fn reshape(&self, rows: usize, cols: usize) -> Option<ExactNumArray>
pub fn reshape(&self, rows: usize, cols: usize) -> Option<ExactNumArray>
Reinterpret the same buffer as rows×cols when the product matches.
Sourcepub fn get2(&self, i: usize, j: usize) -> Option<&ExactNum>
pub fn get2(&self, i: usize, j: usize) -> Option<&ExactNum>
Entry (i, j), or None if out of range.
Sourcepub fn add(&self, rhs: &ExactNumArray) -> Option<ExactNumArray>
pub fn add(&self, rhs: &ExactNumArray) -> Option<ExactNumArray>
Elementwise add at p.
Sourcepub fn add_scalar(&self, s: &ExactNum) -> ExactNumArray
pub fn add_scalar(&self, s: &ExactNum) -> ExactNumArray
Add a scalar to every lane.
Sourcepub fn sub(&self, rhs: &ExactNumArray) -> Option<ExactNumArray>
pub fn sub(&self, rhs: &ExactNumArray) -> Option<ExactNumArray>
Elementwise sub.
Sourcepub fn mul(&self, rhs: &ExactNumArray) -> Option<ExactNumArray>
pub fn mul(&self, rhs: &ExactNumArray) -> Option<ExactNumArray>
Elementwise mul.
Sourcepub fn mul_scalar(&self, s: &ExactNum) -> ExactNumArray
pub fn mul_scalar(&self, s: &ExactNum) -> ExactNumArray
Multiply every lane by a scalar.
Sourcepub fn div(&self, rhs: &ExactNumArray) -> Option<ExactNumArray>
pub fn div(&self, rhs: &ExactNumArray) -> Option<ExactNumArray>
Elementwise div.
Sourcepub fn dot(&self, rhs: &ExactNumArray) -> Option<ExactNum>
pub fn dot(&self, rhs: &ExactNumArray) -> Option<ExactNum>
Sequential dot product at p.
Sourcepub fn matmul(&self, rhs: &ExactNumArray) -> Option<ExactNumArray>
pub fn matmul(&self, rhs: &ExactNumArray) -> Option<ExactNumArray>
Software matmul: (m×k)(k×n) → (m×n). Sequential mul-then-add at p.
Sourcepub fn int(&self) -> ExactNumArray
pub fn int(&self) -> ExactNumArray
Elementwise integer part.
Sourcepub fn fract(&self) -> ExactNumArray
pub fn fract(&self) -> ExactNumArray
Elementwise fractional part.
Sourcepub fn ceil(&self) -> ExactNumArray
pub fn ceil(&self) -> ExactNumArray
Elementwise ceil.
Sourcepub fn floor(&self) -> ExactNumArray
pub fn floor(&self) -> ExactNumArray
Elementwise floor.
Sourcepub fn round(&self, n: usize, rm: RoundingMode) -> ExactNumArray
pub fn round(&self, n: usize, rm: RoundingMode) -> ExactNumArray
Elementwise round with n binary fractional bits.
Sourcepub fn abs(&self) -> ExactNumArray
pub fn abs(&self) -> ExactNumArray
Elementwise absolute value.
Sourcepub fn signum(&self) -> ExactNumArray
pub fn signum(&self) -> ExactNumArray
Elementwise signum.
Sourcepub fn neg(&self) -> ExactNumArray
pub fn neg(&self) -> ExactNumArray
Elementwise negation.
Sourcepub fn reciprocal(&self, p: usize, rm: RoundingMode) -> ExactNumArray
pub fn reciprocal(&self, p: usize, rm: RoundingMode) -> ExactNumArray
Elementwise reciprocal.
Sourcepub fn nth_root(&self, n: usize, p: usize, rm: RoundingMode) -> ExactNumArray
pub fn nth_root(&self, n: usize, p: usize, rm: RoundingMode) -> ExactNumArray
Elementwise nth_root.
Sourcepub fn powi(&self, n: usize, p: usize, rm: RoundingMode) -> ExactNumArray
pub fn powi(&self, n: usize, p: usize, rm: RoundingMode) -> ExactNumArray
Elementwise powi.
Sourcepub fn powsi(&self, n: isize, p: usize, rm: RoundingMode) -> ExactNumArray
pub fn powsi(&self, n: isize, p: usize, rm: RoundingMode) -> ExactNumArray
Elementwise powsi.
Sourcepub fn sin(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn sin(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::sin. cc is the constants cache, not a global.
Sourcepub fn cos(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn cos(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::cos. cc is the constants cache, not a global.
Sourcepub fn tan(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn tan(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::tan. cc is the constants cache, not a global.
Sourcepub fn asin(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn asin(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::asin. cc is the constants cache, not a global.
Sourcepub fn acos(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn acos(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::acos. cc is the constants cache, not a global.
Sourcepub fn atan(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn atan(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::atan. cc is the constants cache, not a global.
Sourcepub fn sinh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn sinh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::sinh. cc is the constants cache, not a global.
Sourcepub fn cosh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn cosh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::cosh. cc is the constants cache, not a global.
Sourcepub fn tanh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn tanh(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::tanh. cc is the constants cache, not a global.
Sourcepub fn asinh(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn asinh( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::asinh. cc is the constants cache, not a global.
Sourcepub fn acosh(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn acosh( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::acosh. cc is the constants cache, not a global.
Sourcepub fn atanh(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn atanh( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::atanh. cc is the constants cache, not a global.
Sourcepub fn exp(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn exp(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::exp. cc is the constants cache, not a global.
Sourcepub fn exp2(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn exp2(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::exp2. cc is the constants cache, not a global.
Sourcepub fn exp10(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn exp10( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::exp10. cc is the constants cache, not a global.
Sourcepub fn expm1(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn expm1( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::expm1. cc is the constants cache, not a global.
Sourcepub fn ln(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn ln(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::ln. cc is the constants cache, not a global.
Sourcepub fn log2(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn log2(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::log2. cc is the constants cache, not a global.
Sourcepub fn log10(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn log10( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::log10. cc is the constants cache, not a global.
Sourcepub fn log1p(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn log1p( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::log1p. cc is the constants cache, not a global.
Sourcepub fn erf(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn erf(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::erf. cc is the constants cache, not a global.
Sourcepub fn erfc(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn erfc(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::erfc. cc is the constants cache, not a global.
Sourcepub fn gamma(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn gamma( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::gamma. cc is the constants cache, not a global.
Sourcepub fn ln_gamma(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn ln_gamma( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::ln_gamma. cc is the constants cache, not a global.
Sourcepub fn digamma(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn digamma( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::digamma. cc is the constants cache, not a global.
Sourcepub fn ei(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn ei(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::ei. cc is the constants cache, not a global.
Sourcepub fn si(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn si(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::si. cc is the constants cache, not a global.
Sourcepub fn ci(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn ci(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::ci. cc is the constants cache, not a global.
Sourcepub fn li(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn li(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::li. cc is the constants cache, not a global.
Sourcepub fn fresnel_s(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn fresnel_s( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::fresnel_s. cc is the constants cache, not a global.
Sourcepub fn fresnel_c(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn fresnel_c( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::fresnel_c. cc is the constants cache, not a global.
Sourcepub fn ai(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn ai(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::ai. cc is the constants cache, not a global.
Sourcepub fn bi(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
pub fn bi(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> ExactNumArray
Elementwise ExactNum::bi. cc is the constants cache, not a global.
Sourcepub fn elliptic_k(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn elliptic_k( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::elliptic_k. cc is the constants cache, not a global.
Sourcepub fn elliptic_e_complete(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn elliptic_e_complete( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::elliptic_e_complete. cc is the constants cache, not a global.
Sourcepub fn rem_pi(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn rem_pi( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ExactNum::rem_pi. cc is the constants cache, not a global.
Sourcepub fn sin_cos(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> (ExactNumArray, ExactNumArray)
pub fn sin_cos( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> (ExactNumArray, ExactNumArray)
Elementwise (sin, cos) with a shared argument reduction.
Sourcepub fn sinh_cosh(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> (ExactNumArray, ExactNumArray)
pub fn sinh_cosh( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> (ExactNumArray, ExactNumArray)
Elementwise (sinh, cosh) with a shared evaluation.
Sourcepub fn sqrt(&self, p: usize, rm: RoundingMode) -> ExactNumArray
pub fn sqrt(&self, p: usize, rm: RoundingMode) -> ExactNumArray
Elementwise sqrt.
Sourcepub fn cbrt(&self, p: usize, rm: RoundingMode) -> ExactNumArray
pub fn cbrt(&self, p: usize, rm: RoundingMode) -> ExactNumArray
Elementwise cbrt.
Sourcepub fn legendre_p(&self, n: u32, p: usize, rm: RoundingMode) -> ExactNumArray
pub fn legendre_p(&self, n: u32, p: usize, rm: RoundingMode) -> ExactNumArray
Elementwise P_n(self).
Sourcepub fn assoc_legendre_p(
&self,
n: u32,
m: i32,
p: usize,
rm: RoundingMode,
) -> ExactNumArray
pub fn assoc_legendre_p( &self, n: u32, m: i32, p: usize, rm: RoundingMode, ) -> ExactNumArray
Elementwise P_n^m(self).
Sourcepub fn hypot(
&self,
other: &ExactNum,
p: usize,
rm: RoundingMode,
) -> ExactNumArray
pub fn hypot( &self, other: &ExactNum, p: usize, rm: RoundingMode, ) -> ExactNumArray
Elementwise hypot(self, other).
Sourcepub fn atan2(
&self,
x: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn atan2( &self, x: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise atan2(self, x). cc is the constants cache, not a global.
Sourcepub fn pow(
&self,
n: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn pow( &self, n: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise pow(self, n).
Sourcepub fn log(
&self,
base: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn log( &self, base: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise log(self, base).
Sourcepub fn gammainc(
&self,
x: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn gammainc( &self, x: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise γ(self, x).
Sourcepub fn gammainc_upper(
&self,
x: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn gammainc_upper( &self, x: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise Γ(self, x).
Sourcepub fn bessel_j(
&self,
n: usize,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn bessel_j( &self, n: usize, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise integer-order J_n(self).
Sourcepub fn bessel_j_nu(
&self,
nu: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn bessel_j_nu( &self, nu: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise J_ν(self).
Sourcepub fn bessel_y(
&self,
nu: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn bessel_y( &self, nu: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise Y_ν(self).
Sourcepub fn bessel_i(
&self,
nu: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn bessel_i( &self, nu: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise I_ν(self).
Sourcepub fn bessel_k(
&self,
nu: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn bessel_k( &self, nu: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise K_ν(self).
Sourcepub fn elliptic_f(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn elliptic_f( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise F(self | m).
Sourcepub fn jacobi_sn(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_sn( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise sn(self | m).
Sourcepub fn jacobi_cn(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_cn( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise cn(self | m).
Sourcepub fn jacobi_dn(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_dn( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise dn(self | m).
Sourcepub fn jacobi_am(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_am( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise am(self | m).
Sourcepub fn jacobi_cd(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_cd( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise cd(self | m).
Sourcepub fn jacobi_ns(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_ns( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ns(self | m).
Sourcepub fn jacobi_nc(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_nc( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise nc(self | m).
Sourcepub fn jacobi_nd(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_nd( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise nd(self | m).
Sourcepub fn jacobi_sc(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_sc( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise sc(self | m).
Sourcepub fn jacobi_sd(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_sd( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise sd(self | m).
Sourcepub fn jacobi_cs(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_cs( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise cs(self | m).
Sourcepub fn jacobi_ds(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_ds( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise ds(self | m).
Sourcepub fn jacobi_dc(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn jacobi_dc( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise dc(self | m).
Sourcepub fn elliptic_e(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn elliptic_e( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise incomplete E(self | m).
Sourcepub fn elliptic_pi_complete(
&self,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn elliptic_pi_complete( &self, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise complete Π(n, m) with self = n.
Sourcepub fn elliptic_pi(
&self,
x: &ExactNum,
m: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn elliptic_pi( &self, x: &ExactNum, m: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise Π(self; x | m).
Sourcepub fn hypergeom_2f1(
&self,
b: &ExactNum,
c: &ExactNum,
z: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn hypergeom_2f1( &self, b: &ExactNum, c: &ExactNum, z: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise {}_2F_1(self, b; c; z).
Sourcepub fn betainc(
&self,
b: &ExactNum,
x: &ExactNum,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> ExactNumArray
pub fn betainc( &self, b: &ExactNum, x: &ExactNum, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> ExactNumArray
Elementwise I_x(self, b).
Sourcepub fn lu_decomp(
&self,
p: usize,
rm: RoundingMode,
) -> Option<(ExactNumArray, ExactNumArray, Vec<usize>)>
pub fn lu_decomp( &self, p: usize, rm: RoundingMode, ) -> Option<(ExactNumArray, ExactNumArray, Vec<usize>)>
LU with partial pivoting: (L, U, P) such that row i of P·A is
original row P[i], and P·A = L·U at (p, rm).
L is unit lower (n×n). U is upper (n×m). A zero pivot
(singular) or a failed heap reserve (MemoryAllocation) returns None.
Sourcepub fn transpose(&self) -> ExactNumArray
pub fn transpose(&self) -> ExactNumArray
Row–column transpose.
Sourcepub fn qr_decomp(
&self,
p: usize,
rm: RoundingMode,
) -> Option<(ExactNumArray, ExactNumArray)>
pub fn qr_decomp( &self, p: usize, rm: RoundingMode, ) -> Option<(ExactNumArray, ExactNumArray)>
Modified Gram–Schmidt QR at (p, rm).
Returns (Q, R) with Q m×k having orthonormal columns, R k×n
upper triangular, k = min(m, n). A rank-deficient column is a zero
column of Q and a zero diagonal entry of R — not a panic.
Sourcepub fn svd_decomp(
&self,
p: usize,
rm: RoundingMode,
) -> Option<(ExactNumArray, ExactNumArray, ExactNumArray)>
pub fn svd_decomp( &self, p: usize, rm: RoundingMode, ) -> Option<(ExactNumArray, ExactNumArray, ExactNumArray)>
Golub–Reinsch SVD at (p, rm).
Returns (U, Σ, V^T) with U m×k (orthonormal columns), Σ k×k
diagonal (non-negative, descending), V^T k×n (orthonormal rows),
k = min(m, n), so that U · Σ · V^T = A at working precision.
Empty input, a NaN/Inf entry, a failed heap reserve, or failure to
converge within SVD_ITER_MAX sweeps per singular value returns None.
Sourcepub fn eigen_decomp(
&self,
p: usize,
rm: RoundingMode,
) -> Option<(ExactNumArray, ExactNumArray)>
pub fn eigen_decomp( &self, p: usize, rm: RoundingMode, ) -> Option<(ExactNumArray, ExactNumArray)>
Symmetric QR eigendecomposition at (p, rm).
Returns (Λ, V) where Λ is a 1×n row of eigenvalues (descending)
and V is n×n with orthonormal columns, so A V = V diag(Λ) and
V diag(Λ) V^T = A at working precision.
Non-square, non-symmetric, empty, non-finite, or failure to converge
within EIGEN_ITER_MAX sweeps per value returns None.
Sourcepub fn fft(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> Option<ExactNumArray>
pub fn fft( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> Option<ExactNumArray>
Radix-2 Cooley–Tukey DFT at (p, rm, cc).
A (1, n) or (n, 1) array is real. A (2, n) array is complex
(row 0 real, row 1 imaginary). n must be a power of two and at most
FFT_MAX_POINTS. Returns a (2, n) spectrum (unnormalized).
Empty, non-finite, or a bad shape returns None.
Sourcepub fn ifft(
&self,
p: usize,
rm: RoundingMode,
cc: &mut Consts,
) -> Option<ExactNumArray>
pub fn ifft( &self, p: usize, rm: RoundingMode, cc: &mut Consts, ) -> Option<ExactNumArray>
Inverse radix-2 DFT at (p, rm, cc). Same layout as Self::fft.
The result is divided by n (unitary inverse of the unnormalized DFT).
Trait Implementations§
Source§impl Clone for ExactNumArray
impl Clone for ExactNumArray
Source§fn clone(&self) -> ExactNumArray
fn clone(&self) -> ExactNumArray
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ExactNumArray
impl RefUnwindSafe for ExactNumArray
impl Send for ExactNumArray
impl Sync for ExactNumArray
impl Unpin for ExactNumArray
impl UnsafeUnpin for ExactNumArray
impl UnwindSafe for ExactNumArray
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more