pub enum HessianMaterialization {
Unavailable,
RepeatedHvp,
BatchedHvp,
Explicit,
}Expand description
How (and whether) a HessianOperator can produce a dense materialized
Hessian. Reported by HessianOperator::materialization() so a
trust-region or ARC solver can decide between calling
materialize_dense once and falling back to repeated Hessian-vector
products through apply_into.
Variants§
Operator cannot produce a dense matrix; only Hv products are available. Solvers that require a dense Hessian must error or fall back to a matrix-free step (Steihaug-Toint, etc.).
RepeatedHvp
Materialization is possible but expensive: it costs one
apply_into per column. Solvers should prefer matrix-free
iterations unless the dimension is small.
BatchedHvp
Materialization can use a batched/multi-RHS path that is faster
than n separate apply_into calls (e.g. tangent propagation
across all basis vectors at once).
Explicit
The operator already holds a dense Hessian (or can produce one
without extra Hv probes). materialize_dense() is essentially
free.
Implementations§
Source§impl HessianMaterialization
impl HessianMaterialization
Sourcepub fn is_available(self) -> bool
pub fn is_available(self) -> bool
True when materialize_dense is expected to succeed and produce
a usable result without significant additional work beyond what
any other access would cost.
Trait Implementations§
Source§impl Clone for HessianMaterialization
impl Clone for HessianMaterialization
Source§fn clone(&self) -> HessianMaterialization
fn clone(&self) -> HessianMaterialization
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HessianMaterialization
impl Debug for HessianMaterialization
Source§impl PartialEq for HessianMaterialization
impl PartialEq for HessianMaterialization
Source§fn eq(&self, other: &HessianMaterialization) -> bool
fn eq(&self, other: &HessianMaterialization) -> bool
self and other values to be equal, and is used by ==.