Trait peroxide::numerical::root::RootFindingProblem

source ·
pub trait RootFindingProblem<const I: usize, const O: usize, T> {
    // Required methods
    fn function(&self, x: Pt<I>) -> Result<Pt<O>>;
    fn initial_guess(&self) -> T;

    // Provided methods
    fn derivative(&self, x: Pt<I>) -> Result<Jaco<O, I>> { ... }
    fn hessian(&self, x: Pt<I>) -> Result<Hess<O, I>> { ... }
}
Expand description

Trait to define a root finding problem

§Type Parameters

  • I: Input type (e.g. f64, [f64; N], or etc.)
  • O: Output type (e.g. f64, [f64; N], or etc.)
  • T: State type (e.g. f64, (f64, f64), or etc.)

§Methods

  • function: Function
  • initial_guess: Initial guess
  • derivative: Derivative (optional)
  • hessian: Hessian (optional)

Required Methods§

source

fn function(&self, x: Pt<I>) -> Result<Pt<O>>

source

fn initial_guess(&self) -> T

Provided Methods§

source

fn derivative(&self, x: Pt<I>) -> Result<Jaco<O, I>>

source

fn hessian(&self, x: Pt<I>) -> Result<Hess<O, I>>

Implementors§