ProblemBuilder

Struct ProblemBuilder 

Source
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>

Source

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>

Source

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>

Source

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>

Source

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>

Source

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>

Source

pub fn build(self) -> Problem<'a, E>

Source§

impl<'a, E: PartialOrd + Scalar> ProblemBuilder<'a, E, Set, Unset, Unset, Unset, Unset>

Source

pub fn build(self) -> Problem<'a, E>

Build a problem

§Panics

The function should not panic, the typestate prevents an invalid state, ensuring the unwrap is Ok

Source§

impl<'a, E: PartialOrd + Scalar, C: Into<Constraint<E>>> ProblemBuilder<'a, E, Unset, Unset, Unset, Unset, C>

Source

pub fn build(self) -> Problem<'a, E>

Source§

impl<'a, E: PartialOrd + Scalar, C: Into<Constraint<E>>> ProblemBuilder<'a, E, Set, Unset, Unset, Unset, C>

Source

pub fn build(self) -> Problem<'a, E>

Build a problem

§Panics

The function should not panic, the typestate prevents an invalid state, ensuring the unwrap is Ok

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>

§

impl<'a, E, DU, IU, DC, IC, C> Send for ProblemBuilder<'a, E, DU, IU, DC, IC, C>
where C: Send, DU: Send, IU: Send, DC: Send, IC: Send, E: Sync,

§

impl<'a, E, DU, IU, DC, IC, C> Sync for ProblemBuilder<'a, E, DU, IU, DC, IC, C>
where C: Sync, DU: Sync, IU: Sync, DC: Sync, IC: Sync, E: Sync,

§

impl<'a, E, DU, IU, DC, IC, C> Unpin for ProblemBuilder<'a, E, DU, IU, DC, IC, C>
where C: Unpin, DU: Unpin, IU: Unpin, DC: Unpin, IC: Unpin,

§

impl<'a, E, DU, IU, DC, IC, C> UnwindSafe for ProblemBuilder<'a, E, DU, IU, DC, IC, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> SendAlias for T

Source§

impl<T> SyncAlias for T