pub struct igraph_complex_t { /* private fields */ }Implementations§
Source§impl igraph_complex_t
impl igraph_complex_t
Sourcepub fn conj(self) -> Self
pub fn conj(self) -> Self
The complex conjugate (igraph_complex_conj, undocumented in igraph_complex.h).
Sourcepub fn inv(self) -> Self
pub fn inv(self) -> Self
The multiplicative inverse 1 / z (igraph_complex_inv, undocumented in igraph_complex.h).
Sourcepub fn sqrt(self) -> Self
pub fn sqrt(self) -> Self
The principal square root (igraph_complex_sqrt, undocumented in igraph_complex.h).
Sourcepub fn exp(self) -> Self
pub fn exp(self) -> Self
The exponential e^z (igraph_complex_exp, undocumented in igraph_complex.h).
Sourcepub fn ln(self) -> Self
pub fn ln(self) -> Self
The principal natural logarithm (igraph_complex_log, undocumented in igraph_complex.h).
Sourcepub fn log10(self) -> Self
pub fn log10(self) -> Self
The principal base-10 logarithm (igraph_complex_log10, undocumented in igraph_complex.h).
Sourcepub fn sec(self) -> Self
pub fn sec(self) -> Self
The secant 1 / cos z (igraph_complex_sec, undocumented in igraph_complex.h).
Source§impl igraph_complex_t
impl igraph_complex_t
Sourcepub fn from_polar(r: f64, theta: f64) -> Self
pub fn from_polar(r: f64, theta: f64) -> Self
Builds r·e^{iθ} from polar coordinates
(igraph_complex_polar, undocumented in igraph_complex.h).
use igraph::igraph_complex_t as Complex;
let z = Complex::from_polar(2.0, std::f64::consts::FRAC_PI_2);
assert!(z.almost_equals(Complex::new(0.0, 2.0), 1e-12));
assert_eq!((z * z).re(), -4.0);Sourcepub fn sqrt_real(x: f64) -> Self
pub fn sqrt_real(x: f64) -> Self
The (principal) square root of a real number, which may be imaginary
(igraph_complex_sqrt_real, undocumented in igraph_complex.h).
Sourcepub fn abs(self) -> f64
pub fn abs(self) -> f64
The modulus |z| (igraph_complex_abs, undocumented in igraph_complex.h).
Sourcepub fn logabs(self) -> f64
pub fn logabs(self) -> f64
The natural logarithm of the modulus, ln |z|, computed accurately
(igraph_complex_logabs, undocumented in igraph_complex.h).
Sourcepub fn arg(self) -> f64
pub fn arg(self) -> f64
The argument (phase angle) in (-π, π]
(igraph_complex_arg, undocumented in igraph_complex.h).
Sourcepub fn almost_equals(self, other: Self, eps: f64) -> bool
pub fn almost_equals(self, other: Self, eps: f64) -> bool
Whether self and other are equal up to the relative tolerance eps
(igraph_complex_almost_equals).
Sourcepub fn pow(self, exponent: Self) -> Self
pub fn pow(self, exponent: Self) -> Self
The complex power self^exponent
(igraph_complex_pow, undocumented in igraph_complex.h).
Sourcepub fn powf(self, exponent: f64) -> Self
pub fn powf(self, exponent: f64) -> Self
The real power self^exponent
(igraph_complex_pow_real, undocumented in igraph_complex.h).
Sourcepub fn log(self, base: Self) -> Self
pub fn log(self, base: Self) -> Self
The logarithm in base base
(igraph_complex_log_b, undocumented in igraph_complex.h).
Sourcepub fn add_real(self, x: f64) -> Self
pub fn add_real(self, x: f64) -> Self
Adds a real number (igraph_complex_add_real, undocumented in igraph_complex.h).
Sourcepub fn add_imag(self, y: f64) -> Self
pub fn add_imag(self, y: f64) -> Self
Adds an imaginary number i·y (igraph_complex_add_imag, undocumented in igraph_complex.h).
Sourcepub fn sub_real(self, x: f64) -> Self
pub fn sub_real(self, x: f64) -> Self
Subtracts a real number (igraph_complex_sub_real, undocumented in igraph_complex.h).
Sourcepub fn sub_imag(self, y: f64) -> Self
pub fn sub_imag(self, y: f64) -> Self
Subtracts an imaginary number i·y (igraph_complex_sub_imag, undocumented in igraph_complex.h).
Sourcepub fn mul_real(self, x: f64) -> Self
pub fn mul_real(self, x: f64) -> Self
Multiplies by a real number (igraph_complex_mul_real, undocumented in igraph_complex.h).
Sourcepub fn mul_imag(self, y: f64) -> Self
pub fn mul_imag(self, y: f64) -> Self
Multiplies by an imaginary number i·y (igraph_complex_mul_imag, undocumented in igraph_complex.h).
Trait Implementations§
Source§impl Add for igraph_complex_t
impl Add for igraph_complex_t
Source§impl AddAssign for igraph_complex_t
impl AddAssign for igraph_complex_t
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
+= operation. Read moreSource§impl Clone for igraph_complex_t
impl Clone for igraph_complex_t
impl Copy for igraph_complex_t
Source§impl Debug for igraph_complex_t
impl Debug for igraph_complex_t
Source§impl Default for igraph_complex_t
impl Default for igraph_complex_t
Source§impl Display for igraph_complex_t
impl Display for igraph_complex_t
Source§impl Div for igraph_complex_t
impl Div for igraph_complex_t
Source§impl DivAssign for igraph_complex_t
impl DivAssign for igraph_complex_t
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
/= operation. Read moreSource§impl Extend<igraph_complex_t> for igraph_vector_complex_t
impl Extend<igraph_complex_t> for igraph_vector_complex_t
Source§fn extend<I: IntoIterator<Item = igraph_complex_t>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = igraph_complex_t>>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl From<f64> for igraph_complex_t
impl From<f64> for igraph_complex_t
Source§impl FromIterator<igraph_complex_t> for igraph_vector_complex_t
impl FromIterator<igraph_complex_t> for igraph_vector_complex_t
Source§fn from_iter<I: IntoIterator<Item = igraph_complex_t>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = igraph_complex_t>>(iter: I) -> Self
Source§impl Mul for igraph_complex_t
impl Mul for igraph_complex_t
Source§impl MulAssign for igraph_complex_t
impl MulAssign for igraph_complex_t
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
*= operation. Read moreSource§impl Neg for igraph_complex_t
impl Neg for igraph_complex_t
Source§impl PartialEq for igraph_complex_t
impl PartialEq for igraph_complex_t
Source§impl Sub for igraph_complex_t
impl Sub for igraph_complex_t
Source§impl SubAssign for igraph_complex_t
impl SubAssign for igraph_complex_t
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
-= operation. Read more