pub struct Order2<const K: usize>(pub Tower2<K>);Expand description
Truncated SECOND-order scalar: value v, gradient g_a, Hessian H_{ab}.
This is a thin newtype over the production crate::jet_tower::Tower2, so
its (v, g, H) channels are obtained by the SAME formulas — and are
therefore bit-identical to both crate::jet_tower::Tower2 and the order-≤2
channels of a full crate::jet_tower::Tower4 (doc §A.1, “Bit-identity with
the full tower”). The wrapper exists only to satisfy the generic
JetScalar interface (the compose_unary / add / sub / neg /
recip the trait demands, which Tower2 does not expose by that shape) —
every channel is delegated to Tower2 arithmetic unchanged.
Tuple Fields§
§0: Tower2<K>Implementations§
Trait Implementations§
impl<const K: usize> Copy for Order2<K>
Source§impl<const K: usize> JetScalar<K> for Order2<K>
impl<const K: usize> JetScalar<K> for Order2<K>
Source§fn variable(x: f64, axis: usize) -> Self
fn variable(x: f64, axis: usize) -> Self
The seeded variable
p_axis at value x: unit first derivative in slot
axis, all higher channels zero. (The nilpotent / cross channels of the
directional scalars are seeded zero — callers set ε/δ directions through
the scalar-specific OneSeed::seed_direction / TwoSeed::seed.)Source§fn compose_unary(&self, d: [f64; 5]) -> Self
fn compose_unary(&self, d: [f64; 5]) -> Self
Exact multivariate Faà di Bruno composition
f ∘ self, given the outer
derivative stack d = [f(u), f′(u), f″(u), f‴(u), f⁗(u)] at
u = self.value(). Read moreSource§fn ln(&self) -> Self
fn ln(&self) -> Self
ln(self). Caller guarantees positivity. Same derivative stack
crate::jet_tower::Tower4::ln uses, so any program written over both
matches term-for-term.Source§fn powf(&self, a: f64) -> Self
fn powf(&self, a: f64) -> Self
self^a for real exponent a. Caller guarantees a positive base.
Mirrors crate::jet_tower::Tower4::powf (falling-factorial stack).Source§fn ln_gamma(&self) -> Self
fn ln_gamma(&self) -> Self
ln Γ(self). Caller guarantees a positive argument. Uses the SAME
hand-certified derivative stack crate::jet_tower::Tower4::ln_gamma
consumes (crate::jet_tower::ln_gamma_derivative_stack), so any
program written over both matches term-for-term.Source§fn digamma(&self) -> Self
fn digamma(&self) -> Self
ψ(self) = d/dx ln Γ(x) (digamma). Caller guarantees a positive
argument. Same hand-certified stack
crate::jet_tower::digamma_derivative_stack.Auto Trait Implementations§
impl<const K: usize> Freeze for Order2<K>
impl<const K: usize> RefUnwindSafe for Order2<K>
impl<const K: usize> Send for Order2<K>
impl<const K: usize> Sync for Order2<K>
impl<const K: usize> Unpin for Order2<K>
impl<const K: usize> UnsafeUnpin for Order2<K>
impl<const K: usize> UnwindSafe for Order2<K>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ClosedNeg for Twhere
T: Neg<Output = T>,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.