NllsProblem

Struct NllsProblem 

Source
pub struct NllsProblem<'cost> { /* private fields */ }
Expand description

Non-Linear Least Squares problem.

See module-level documentation building the instance of this type.

Implementations§

Source§

impl<'cost> NllsProblem<'cost>

Source

pub fn new() -> Self

Crate a new non-linear least squares problem with no residual blocks.

Source

pub fn residual_block_builder(self) -> ResidualBlockBuilder<'cost>

Capture this problem into a builder for a new residual block.

Source

pub fn set_parameter_block_constant( &mut self, block_index: usize, ) -> Result<(), ParameterBlockStorageError>

Set parameter block to be constant during the optimization. Parameter block must be already added to the problem, otherwise ParameterBlockStorageError returned.

Source

pub fn set_parameter_block_variable( &mut self, block_index: usize, ) -> Result<(), ParameterBlockStorageError>

Set parameter block to be variable during the optimization. Parameter block must be already added to the problem, otherwise ParameterBlockStorageError returned.

Source

pub fn is_parameter_block_constant( &self, block_index: usize, ) -> Result<bool, ParameterBlockStorageError>

Check if parameter block is constant. Parameter block must be already added to the problem, otherwise ParameterBlockStorageError returned.

Source

pub fn solve( self, options: &SolverOptions, ) -> Result<NllsProblemSolution, NllsProblemError>

Solve the problem.

Trait Implementations§

Source§

impl Default for NllsProblem<'_>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<'cost> Freeze for NllsProblem<'cost>

§

impl<'cost> RefUnwindSafe for NllsProblem<'cost>

§

impl<'cost> !Send for NllsProblem<'cost>

§

impl<'cost> !Sync for NllsProblem<'cost>

§

impl<'cost> Unpin for NllsProblem<'cost>

§

impl<'cost> UnwindSafe for NllsProblem<'cost>

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, 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.