pub struct MultiRombergResult<F: IntegrateFloat> {
pub value: F,
pub abs_error: F,
pub method: IntegrationMethod,
}Expand description
Compute the definite integral of a function over multiple dimensions using Romberg integration
§Arguments
f- The multidimensional function to integrateranges- Array of integration ranges (a, b) for each dimensionoptions- Optional integration parameters
§Returns
IntegrateResult<F>- The approximate value of the integral
§Examples
use scirs2_integrate::romberg::{MultiRombergResult, IntegrationMethod};
// This struct holds the result of a multi-dimensional Romberg integration
let result = MultiRombergResult {
value: 2.0, // Example value
abs_error: 1e-10,
method: IntegrationMethod::Romberg,
};
// Access the computed integral value
assert!(result.value > 0.0);
assert!(result.abs_error < 1e-9);Result of a multidimensional Romberg integration computation
Fields§
§value: FEstimated value of the integral
abs_error: FEstimated absolute error
method: IntegrationMethodMethod used for the integration
Trait Implementations§
Source§impl<F: Clone + IntegrateFloat> Clone for MultiRombergResult<F>
impl<F: Clone + IntegrateFloat> Clone for MultiRombergResult<F>
Source§fn clone(&self) -> MultiRombergResult<F>
fn clone(&self) -> MultiRombergResult<F>
Returns a duplicate of the value. Read more
1.0.0 · 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<F> Freeze for MultiRombergResult<F>where
F: Freeze,
impl<F> RefUnwindSafe for MultiRombergResult<F>where
F: RefUnwindSafe,
impl<F> Send for MultiRombergResult<F>where
F: Send,
impl<F> Sync for MultiRombergResult<F>where
F: Sync,
impl<F> Unpin for MultiRombergResult<F>where
F: Unpin,
impl<F> UnwindSafe for MultiRombergResult<F>where
F: UnwindSafe,
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