pub struct IntegrationState<I, O, F>where
F: PartialOrd + PartialEq,{
pub integral: Option<O>,
pub prev_integral: Option<O>,
pub best_integral: Option<O>,
pub prev_best_integral: Option<O>,
pub segments: SegmentHeap<I, O, F>,
pub counts: HashMap<String, usize>,
pub accumulate_values: bool,
}Fields§
§integral: Option<O>Current value of the integral
prev_integral: Option<O>Previous value of the integral
best_integral: Option<O>Lowest error value of the integral
prev_best_integral: Option<O>Previous best parameter vector
segments: SegmentHeap<I, O, F>segments in the integral
counts: HashMap<String, usize>Evaluation counts
accumulate_values: boolWhether to accumulate resolved values in the output
Implementations§
Source§impl<I, O, F> IntegrationState<I, O, F>
impl<I, O, F> IntegrationState<I, O, F>
pub fn param(self, param: O) -> Self
pub fn segments(self, segments: Vec<Segment<I, O, F>>) -> Self
pub fn pop_worst_segment(&mut self) -> Option<Segment<I, O, F>>
pub fn take_integral(&mut self) -> Option<O>
pub fn get_integral(&self) -> Option<&O>
pub fn get_prev_integral(&self) -> Option<&O>
pub fn take_prev_integral(&mut self) -> Option<O>
pub fn get_prev_best_integral(&self) -> Option<&O>
pub fn take_best_integral(&mut self) -> Option<O>
pub fn take_prev_best_integral(&mut self) -> Option<O>
pub fn into_resolved(self) -> Option<Values<I, O>>
Trait Implementations§
Source§impl<I, O, F, P> Calculation<P, IntegrationState<I, O, F>> for AdaptiveIntegrator<I>where
P: Integrable<Input = I, Output = O> + Send + Sync,
I: ComplexField<RealField = F> + FromPrimitive + Copy,
O: IntegrationOutput<Float = F, Scalar = I>,
F: IntegrableFloat + RealField + FromPrimitive + AccumulateError<F> + RescaleError,
impl<I, O, F, P> Calculation<P, IntegrationState<I, O, F>> for AdaptiveIntegrator<I>where
P: Integrable<Input = I, Output = O> + Send + Sync,
I: ComplexField<RealField = F> + FromPrimitive + Copy,
O: IntegrationOutput<Float = F, Scalar = I>,
F: IntegrableFloat + RealField + FromPrimitive + AccumulateError<F> + RescaleError,
Source§type Error = IntegrationError<I>
type Error = IntegrationError<I>
The error associated with the problem
Source§type Output = IntegrationResult<I, O>
type Output = IntegrationResult<I, O>
The type returned to the caller. Read more
Source§fn initialise(
&mut self,
problem: &mut Problem<P>,
state: IntegrationState<I, O, F>,
) -> Result<IntegrationState<I, O, F>, Self::Error>
fn initialise( &mut self, problem: &mut Problem<P>, state: IntegrationState<I, O, F>, ) -> Result<IntegrationState<I, O, F>, Self::Error>
Initialisation. Read more
Source§fn next(
&mut self,
problem: &mut Problem<P>,
state: IntegrationState<I, O, F>,
) -> Result<IntegrationState<I, O, F>, Self::Error>
fn next( &mut self, problem: &mut Problem<P>, state: IntegrationState<I, O, F>, ) -> Result<IntegrationState<I, O, F>, Self::Error>
One iteration of the core algorithm
Source§impl<I, O, F, P> Calculation<P, IntegrationState<I, O, F>> for AdaptiveRectangularContourIntegrator<I>where
P: Integrable<Input = I, Output = O> + Send + Sync,
I: ComplexField<RealField = F> + FromPrimitive + Copy,
O: IntegrationOutput<Float = F, Scalar = I>,
F: IntegrableFloat + RealField + FromPrimitive + AccumulateError<F> + RescaleError,
impl<I, O, F, P> Calculation<P, IntegrationState<I, O, F>> for AdaptiveRectangularContourIntegrator<I>where
P: Integrable<Input = I, Output = O> + Send + Sync,
I: ComplexField<RealField = F> + FromPrimitive + Copy,
O: IntegrationOutput<Float = F, Scalar = I>,
F: IntegrableFloat + RealField + FromPrimitive + AccumulateError<F> + RescaleError,
Source§const NAME: &'static str = "Adaptive Contour Integrator"
const NAME: &'static str = "Adaptive Contour Integrator"
An identifier for the calculation. Read more
Source§type Error = IntegrationError<I>
type Error = IntegrationError<I>
The error associated with the problem
Source§type Output = IntegrationResult<I, O>
type Output = IntegrationResult<I, O>
The type returned to the caller. Read more
Source§fn initialise(
&mut self,
problem: &mut Problem<P>,
state: IntegrationState<I, O, F>,
) -> Result<IntegrationState<I, O, F>, Self::Error>
fn initialise( &mut self, problem: &mut Problem<P>, state: IntegrationState<I, O, F>, ) -> Result<IntegrationState<I, O, F>, Self::Error>
Initialisation. Read more
Source§fn next(
&mut self,
problem: &mut Problem<P>,
state: IntegrationState<I, O, F>,
) -> Result<IntegrationState<I, O, F>, Self::Error>
fn next( &mut self, problem: &mut Problem<P>, state: IntegrationState<I, O, F>, ) -> Result<IntegrationState<I, O, F>, Self::Error>
One iteration of the core algorithm
Source§impl<I: Clone, O: Clone, F> Clone for IntegrationState<I, O, F>
impl<I: Clone, O: Clone, F> Clone for IntegrationState<I, O, F>
Source§fn clone(&self) -> IntegrationState<I, O, F>
fn clone(&self) -> IntegrationState<I, O, 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 moreSource§impl<I: Default, O: Default, F> Default for IntegrationState<I, O, F>
impl<I: Default, O: Default, F> Default for IntegrationState<I, O, F>
Source§fn default() -> IntegrationState<I, O, F>
fn default() -> IntegrationState<I, O, F>
Returns the “default value” for a type. Read more
Source§impl<'de, I, O, F> Deserialize<'de> for IntegrationState<I, O, F>
impl<'de, I, O, F> Deserialize<'de> for IntegrationState<I, O, F>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<I, O, F> From<IntegrationState<I, O, F>> for IntegrationResult<I, O>where
O: IntegrationOutput<Float = F> + Clone,
I: ComplexField<RealField = F> + Copy,
F: IntegrableFloat,
impl<I, O, F> From<IntegrationState<I, O, F>> for IntegrationResult<I, O>where
O: IntegrationOutput<Float = F> + Clone,
I: ComplexField<RealField = F> + Copy,
F: IntegrableFloat,
Source§fn from(val: IntegrationState<I, O, F>) -> Self
fn from(val: IntegrationState<I, O, F>) -> Self
Converts to this type from the input type.
Source§impl<I, O, F> Serialize for IntegrationState<I, O, F>
impl<I, O, F> Serialize for IntegrationState<I, O, F>
Source§impl<I, O, F> UserState for IntegrationState<I, O, F>
impl<I, O, F> UserState for IntegrationState<I, O, F>
Auto Trait Implementations§
impl<I, O, F> Freeze for IntegrationState<I, O, F>where
O: Freeze,
impl<I, O, F> RefUnwindSafe for IntegrationState<I, O, F>
impl<I, O, F> Send for IntegrationState<I, O, F>
impl<I, O, F> Sync for IntegrationState<I, O, F>
impl<I, O, F> Unpin for IntegrationState<I, O, F>
impl<I, O, F> UnwindSafe for IntegrationState<I, O, F>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.