HSFunction

Struct HSFunction 

Source
pub struct HSFunction<R: RealScalar, const D: DifferentiationLevel> { /* private fields */ }

Trait Implementations§

Source§

impl<R: RealScalar, const D: DifferentiationLevel> CostFunction<R> for HSFunction<R, D>

Source§

fn cost(&mut self, params: &[R]) -> R

Calculates the cost for the given parameters.
Source§

impl<R: RealScalar, const D: DifferentiationLevel> Function for HSFunction<R, D>

Source§

impl<R: RealScalar, const D: DifferentiationLevel> Gradient<R> for HSFunction<R, D>

Source§

fn gradient_into(&mut self, params: &[R], grad_out: RowMut<'_, R>)

Calculates the gradient for the given parameters.
Source§

fn cost_and_gradient_into(&mut self, params: &[R], grad_out: RowMut<'_, R>) -> R

Calculates the cost and gradient for the given parameters.
Source§

fn allocate_gradient(&self) -> Row<R>

Source§

impl<R: RealScalar, const D: DifferentiationLevel> Hessian<R> for HSFunction<R, D>

Source§

fn hessian_into(&mut self, _params: &[R], _hess_out: MatMut<'_, R>)

Calculates the Hessian for the given parameters.
Source§

fn cost_gradient_and_hessian_into( &mut self, _params: &[R], _grad_out: RowMut<'_, R>, _hess_out: MatMut<'_, R>, ) -> R

Calculates the cost, gradient, and Hessian for the given parameters.
Source§

fn allocate_hessian(&self) -> Mat<R>

Source§

impl<R: RealScalar, const D: DifferentiationLevel> Jacobian<R> for HSFunction<R, D>

Source§

fn residuals_and_jacobian_into( &mut self, params: &[R], residuals_out: ColMut<'_, R>, jacobian_out: MatMut<'_, R>, )

Calculates the residuals and Jacobian for the given parameters.
Source§

fn jacobian_into(&mut self, params: &[R], jacobian_out: MatMut<'_, R>)

Calculates the Jacobian for the given parameters.
Source§

fn allocate_jacobian(&self) -> Mat<R>

Source§

impl<R: RealScalar, const D: DifferentiationLevel> ResidualFunction<R> for HSFunction<R, D>

Source§

fn num_residuals(&self) -> usize

Source§

fn residuals_into(&mut self, params: &[R], residuals_out: ColMut<'_, R>)

Calculates the residuals for the given parameters.
Source§

fn allocate_residual(&self) -> Col<R>

Auto Trait Implementations§

§

impl<R, const D: usize> Freeze for HSFunction<R, D>
where R: Freeze,

§

impl<R, const D: usize> RefUnwindSafe for HSFunction<R, D>

§

impl<R, const D: usize> !Send for HSFunction<R, D>

§

impl<R, const D: usize> !Sync for HSFunction<R, D>

§

impl<R, const D: usize> Unpin for HSFunction<R, D>
where R: Unpin,

§

impl<R, const D: usize> UnwindSafe for HSFunction<R, D>

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> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

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

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

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> IntoEither for T

Source§

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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