pub trait DynamicOrder2Term {
// Required methods
fn outer_first(&self) -> f64;
fn outer_second(&self) -> f64;
fn inner_gradient(&self, axis: usize) -> f64;
fn inner_hessian(&self, row: usize, column: usize) -> f64;
}Expand description
One inner scalar in a runtime-width additive order-two composition.
Implementors expose only the inner gradient and Hessian. The corresponding
outer function’s first and second derivatives live beside the source in the
caller’s term type, so several terms that share an inner scalar may be fused
before entering DynamicOrder2Accumulator.
Required Methods§
Sourcefn outer_first(&self) -> f64
fn outer_first(&self) -> f64
Outer first derivative f'(q) for this already-fused source.
Sourcefn outer_second(&self) -> f64
fn outer_second(&self) -> f64
Outer second derivative f''(q) for this already-fused source.
Sourcefn inner_gradient(&self, axis: usize) -> f64
fn inner_gradient(&self, axis: usize) -> f64
Inner first derivative q_i.
Sourcefn inner_hessian(&self, row: usize, column: usize) -> f64
fn inner_hessian(&self, row: usize, column: usize) -> f64
Inner second derivative q_ij.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".