Expand description
Structure for Root finding
Fields
curr: RootState
Implementations
Create RootFinder
Default Options
- Times: 100
- Tolerance: 1e-10
Usage
extern crate peroxide;
use peroxide::fuga::*;
fn main() -> Result<(), RootError> {
let init = RootState::I(1f64, 3f64);
let mut a = RootFinder::new(init, Bisection, f)?;
let x = a.find_root()?;
x.print();
Ok(())
}
fn f(x: AD) -> AD {
x.powi(2) - 4f64
}
Condition number
Trait Implementations
Auto Trait Implementations
impl<F> RefUnwindSafe for RootFinder<F> where
F: RefUnwindSafe,
impl<F> Send for RootFinder<F> where
F: Send,
impl<F> Sync for RootFinder<F> where
F: Sync,
impl<F> Unpin for RootFinder<F>
impl<F> UnwindSafe for RootFinder<F> where
F: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more