pub struct ProblemBuilder<'a, E, DU, IU, DC, IC, C> { /* private fields */ }Expand description
Problem builder
The ProblemBuilder allows us to build a Problem from known inputs
and uncertainties.
Implementations§
Source§impl<'a, E: Float> ProblemBuilder<'a, E, Unset, Unset, Unset, Unset, Unset>
impl<'a, E: Float> ProblemBuilder<'a, E, Unset, Unset, Unset, Unset, Unset>
Sourcepub fn new<V: Into<ArrayView1<'a, E>>>(
independent: V,
dependent: V,
) -> Result<Self, PolyCalError<E>>
pub fn new<V: Into<ArrayView1<'a, E>>>( independent: V, dependent: V, ) -> Result<Self, PolyCalError<E>>
Create a new ProblemBuilder from independent and dependent data.
§Errors
- If the independent and dependent data provided contain unequal numbers of observations.
- If the independent and dependent data provided contain NaN or infinity
Source§impl<E, DU, IU, DC, IC, C> ProblemBuilder<'_, E, DU, IU, DC, IC, C>
impl<E, DU, IU, DC, IC, C> ProblemBuilder<'_, E, DU, IU, DC, IC, C>
Sourcepub const fn with_scoring_strategy(
self,
scoring_strategy: ScoringStrategy,
) -> Self
pub const fn with_scoring_strategy( self, scoring_strategy: ScoringStrategy, ) -> Self
Attach a scoring strategy.
Source§impl<'a, E: Float, C> ProblemBuilder<'a, E, Unset, Unset, Unset, Unset, C>
impl<'a, E: Float, C> ProblemBuilder<'a, E, Unset, Unset, Unset, Unset, C>
Sourcepub fn with_dependent_variance(
self,
dependent_variance: impl Into<ArrayView1<'a, E>>,
) -> Result<ProblemBuilder<'a, E, Set, Unset, Unset, Unset, C>, PolyCalError<E>>
pub fn with_dependent_variance( self, dependent_variance: impl Into<ArrayView1<'a, E>>, ) -> Result<ProblemBuilder<'a, E, Set, Unset, Unset, Unset, C>, PolyCalError<E>>
Attach a variance for the dependent variable
§Errors
- If the provided values contain any NaN, infinite, or zero values. Note that zeros are not allowed, because the weighted least squares process relies on the inverse of the variance
Source§impl<'a, E: Float, C> ProblemBuilder<'a, E, Unset, Set, Unset, Unset, C>
impl<'a, E: Float, C> ProblemBuilder<'a, E, Unset, Set, Unset, Unset, C>
Sourcepub fn with_dependent_variance(
self,
dependent_variance: impl Into<ArrayView1<'a, E>>,
) -> Result<ProblemBuilder<'a, E, Set, Set, Unset, Unset, C>, PolyCalError<E>>
pub fn with_dependent_variance( self, dependent_variance: impl Into<ArrayView1<'a, E>>, ) -> Result<ProblemBuilder<'a, E, Set, Set, Unset, Unset, C>, PolyCalError<E>>
Attach a variance for the dependent variable
§Errors
- If the provided values contain any NaN, infinite, or zero values. Note that zeros are not allowed, because the weighted least squares process relies on the inverse of the variance
Source§impl<'a, E, DU, IU, DC, IC> ProblemBuilder<'a, E, DU, IU, DC, IC, Unset>
impl<'a, E, DU, IU, DC, IC> ProblemBuilder<'a, E, DU, IU, DC, IC, Unset>
pub const fn with_constraint<C>( self, constraint: C, ) -> ProblemBuilder<'a, E, DU, IU, DC, IC, C>
Source§impl<'a, E: PartialOrd + Scalar> ProblemBuilder<'a, E, Unset, Unset, Unset, Unset, Unset>
impl<'a, E: PartialOrd + Scalar> ProblemBuilder<'a, E, Unset, Unset, Unset, Unset, Unset>
Source§impl<'a, E: PartialOrd + Scalar> ProblemBuilder<'a, E, Set, Unset, Unset, Unset, Unset>
impl<'a, E: PartialOrd + Scalar> ProblemBuilder<'a, E, Set, Unset, Unset, Unset, Unset>
Source§impl<'a, E: PartialOrd + Scalar, C: Into<Constraint<E>>> ProblemBuilder<'a, E, Unset, Unset, Unset, Unset, C>
impl<'a, E: PartialOrd + Scalar, C: Into<Constraint<E>>> ProblemBuilder<'a, E, Unset, Unset, Unset, Unset, C>
Source§impl<'a, E: PartialOrd + Scalar, C: Into<Constraint<E>>> ProblemBuilder<'a, E, Set, Unset, Unset, Unset, C>
impl<'a, E: PartialOrd + Scalar, C: Into<Constraint<E>>> ProblemBuilder<'a, E, Set, Unset, Unset, Unset, C>
Auto Trait Implementations§
impl<'a, E, DU, IU, DC, IC, C> Freeze for ProblemBuilder<'a, E, DU, IU, DC, IC, C>where
C: Freeze,
impl<'a, E, DU, IU, DC, IC, C> RefUnwindSafe for ProblemBuilder<'a, E, DU, IU, DC, IC, C>where
C: RefUnwindSafe,
DU: RefUnwindSafe,
IU: RefUnwindSafe,
DC: RefUnwindSafe,
IC: RefUnwindSafe,
E: RefUnwindSafe,
impl<'a, E, DU, IU, DC, IC, C> Send for ProblemBuilder<'a, E, DU, IU, DC, IC, C>
impl<'a, E, DU, IU, DC, IC, C> Sync for ProblemBuilder<'a, E, DU, IU, DC, IC, C>
impl<'a, E, DU, IU, DC, IC, C> Unpin for ProblemBuilder<'a, E, DU, IU, DC, IC, C>
impl<'a, E, DU, IU, DC, IC, C> UnwindSafe for ProblemBuilder<'a, E, DU, IU, DC, IC, C>where
C: UnwindSafe,
E: RefUnwindSafe,
DU: UnwindSafe,
IU: UnwindSafe,
DC: UnwindSafe,
IC: 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