Skip to main content

Dual22

Type Alias Dual22 

Source
pub type Dual22 = Dual2<Dual2<f64>>;
Expand description

A Dual2<Dual2<f64>> seeded with independent directions a (outer) and b (inner): value x, unit first derivative along both requested directions. p0 should be seeded (a=1, b=0) and p1 (a=0, b=1) for a two-primary program (mirrors Tower4::variable(x, 0) / Tower4::variable(x, 1)).

Aliased Type§

pub struct Dual22 {
    pub v: Dual2<f64>,
    pub g: Dual2<f64>,
    pub h: Dual2<f64>,
}

Fields§

§v: Dual2<f64>

Value channel.

§g: Dual2<f64>

First derivative in this dual’s direction.

§h: Dual2<f64>

Second derivative in this dual’s direction.

Implementations§

Source§

impl Dual22

Source

pub fn channels(&self) -> [f64; 9]

The nine channels this nested dual represents, keyed to the two-primary crate::jet_tower::Tower4 indices 0 (outer a) and 1 (inner b): (value, ∂a, ∂b, ∂aa, ∂ab, ∂bb, ∂aab, ∂abb, ∂aabb).