pub struct ComplexBall { /* private fields */ }Expand description
Disk enclosure in (\mathbb{C}): center mid, radius rad.
Implementations§
Source§impl ComplexBall
impl ComplexBall
Sourcepub fn new(mid: ExactComplex, rad: ExactNum) -> Self
pub fn new(mid: ExactComplex, rad: ExactNum) -> Self
Disk mid with radius rad (taken in absolute value).
Sourcepub fn mid(&self) -> &ExactComplex
pub fn mid(&self) -> &ExactComplex
Center.
Sourcepub fn add(&self, other: &Self, p: usize, rm: RoundingMode) -> Self
pub fn add(&self, other: &Self, p: usize, rm: RoundingMode) -> Self
Sum of two disks: radii add, plus rounding slack.
Sourcepub fn mul(&self, other: &Self, p: usize, rm: RoundingMode) -> Self
pub fn mul(&self, other: &Self, p: usize, rm: RoundingMode) -> Self
Product of two disks: (\lvert m_1\rvert r_2+\lvert m_2\rvert r_1+r_1 r_2) plus slack.
Sourcepub fn exp(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Self
pub fn exp(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Self
Exponential. Lipschitz (\lvert e^z\rvert\le \exp(\mathrm{Re},m+r)).
Sourcepub fn ln(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Self
pub fn ln(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Self
Principal logarithm. Domain: the disk must exclude (0). Lipschitz (1/(\lvert m\rvert-r)).
Sourcepub fn sin(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Self
pub fn sin(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Self
Sine. (\lvert\cos(z)\rvert\le\cosh(\lvert\mathrm{Im},m\rvert+r)).
Sourcepub fn cos(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Self
pub fn cos(&self, p: usize, rm: RoundingMode, cc: &mut Consts) -> Self
Cosine. Same Lipschitz bound as sin.
Sourcepub fn contains(&self, z: &ExactComplex, p: usize) -> bool
pub fn contains(&self, z: &ExactComplex, p: usize) -> bool
True when (\lvert z-\mathrm{mid}\rvert\le\mathrm{rad}).
Trait Implementations§
Source§impl Clone for ComplexBall
impl Clone for ComplexBall
Source§fn clone(&self) -> ComplexBall
fn clone(&self) -> ComplexBall
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ComplexBall
impl RefUnwindSafe for ComplexBall
impl Send for ComplexBall
impl Sync for ComplexBall
impl Unpin for ComplexBall
impl UnsafeUnpin for ComplexBall
impl UnwindSafe for ComplexBall
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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