Trait ImplicitFunction

Source
pub trait ImplicitFunction<F> {
    type Parameters<D: DualNum<F>>: DualStruct<D, F>;
    type Variable<D>;

    // Required method
    fn residual<D: DualNum<F> + Copy>(
        parameters: &Self::Parameters<D>,
        x: Self::Variable<D>,
    ) -> Self::Variable<D>;
}
Expand description

An implicit function g(x, args) = 0 for which derivatives of x can be calculated with the ImplicitDerivative struct.

Required Associated Types§

Source

type Parameters<D: DualNum<F>>: DualStruct<D, F>

data type of the parameter struct, needs to implement DualStruct.

Source

type Variable<D>

data type of the variable x, needs to be either D, [D; 2], or SVector<D, N>.

Required Methods§

Source

fn residual<D: DualNum<F> + Copy>( parameters: &Self::Parameters<D>, x: Self::Variable<D>, ) -> Self::Variable<D>

implementation of the residual function g(x, args) = 0.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§