pub struct QuadOpts {
pub method: Symbol,
pub n: Option<usize>,
pub tol: Option<f64>,
}Expand description
Options controlling an integration (quadrature) call.
Fields§
§method: SymbolThe quadrature method to use, or auto to let the registry choose.
n: Option<usize>The number of subdivisions, for fixed-rule quadrature.
tol: Option<f64>The error tolerance, for adaptive quadrature.
Implementations§
Source§impl QuadOpts
impl QuadOpts
Sourcepub fn fixed_default() -> Self
pub fn fixed_default() -> Self
Returns default options for fixed-rule integration (auto, no tolerance).
Sourcepub fn adaptive_default() -> Self
pub fn adaptive_default() -> Self
Returns default options for adaptive integration (auto with a tolerance).
§Examples
use sim_lib_numbers_numeric::QuadOpts;
let fixed = QuadOpts::fixed_default();
assert!(fixed.tol.is_none());
let adaptive = QuadOpts::adaptive_default();
assert!(adaptive.tol.is_some());Trait Implementations§
Auto Trait Implementations§
impl Freeze for QuadOpts
impl RefUnwindSafe for QuadOpts
impl Send for QuadOpts
impl Sync for QuadOpts
impl Unpin for QuadOpts
impl UnsafeUnpin for QuadOpts
impl UnwindSafe for QuadOpts
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