pub trait NonLinearOpJacobian: NonLinearOp {
// Required method
fn jac_mul_inplace(
&self,
x: &Self::V,
t: Self::T,
v: &Self::V,
y: &mut Self::V,
);
// Provided methods
fn jac_mul(&self, x: &Self::V, t: Self::T, v: &Self::V) -> Self::V { ... }
fn jacobian(&self, x: &Self::V, t: Self::T) -> Self::M { ... }
fn jacobian_sparsity(&self) -> Option<<Self::M as Matrix>::Sparsity> { ... }
fn jacobian_inplace(&self, x: &Self::V, t: Self::T, y: &mut Self::M) { ... }
fn _default_jacobian_inplace(
&self,
x: &Self::V,
t: Self::T,
y: &mut Self::M,
) { ... }
}Required Methods§
Provided Methods§
Sourcefn jac_mul(&self, x: &Self::V, t: Self::T, v: &Self::V) -> Self::V
fn jac_mul(&self, x: &Self::V, t: Self::T, v: &Self::V) -> Self::V
Compute the product of the Jacobian with a given vector J(x, t) * v, and return the result.
Use [Self::jac_mul_inplace] to for a non-allocating version.
Sourcefn jacobian(&self, x: &Self::V, t: Self::T) -> Self::M
fn jacobian(&self, x: &Self::V, t: Self::T) -> Self::M
Compute the Jacobian matrix J(x, t) of the operator and return it.
See Self::jacobian_inplace for a non-allocating version.
Sourcefn jacobian_sparsity(&self) -> Option<<Self::M as Matrix>::Sparsity>
fn jacobian_sparsity(&self) -> Option<<Self::M as Matrix>::Sparsity>
Return sparsity information (if available)
Sourcefn jacobian_inplace(&self, x: &Self::V, t: Self::T, y: &mut Self::M)
fn jacobian_inplace(&self, x: &Self::V, t: Self::T, y: &mut Self::M)
Compute the Jacobian matrix J(x, t) of the operator and store it in the matrix y.
y should have been previously initialised using the output of Self::jacobian_sparsity.
The default implementation of this method computes the Jacobian using Self::jac_mul_inplace,
but it can be overriden for more efficient implementations.
Sourcefn _default_jacobian_inplace(&self, x: &Self::V, t: Self::T, y: &mut Self::M)
fn _default_jacobian_inplace(&self, x: &Self::V, t: Self::T, y: &mut Self::M)
Default implementation of the Jacobian computation (this is the default for Self::jacobian_inplace).