Skip to main content

is_separable

Function is_separable 

Source
pub fn is_separable(graph: &FitGraphSpec) -> bool
Expand description

Returns true when every node in the graph is either separable (has an amplitude linear param + nonlinear shape params) or invariant (all params linear). Returns false for unknown or non-conforming node types.

The wire-format string for each ModelTypeStr is read from the canonical ModelTypeStr::as_str() in spectrafit-types; VarPro separability is then a membership check against [SEPARABLE_MODEL_TYPES] / [INVARIANT_MODEL_TYPES]. Non-separable variants (true Voigt, skewed Gaussian, EMG, log-normal, Pearson VII, Tauc, Cauchy, KWW, …) fall through here untouched — they are simply absent from SEPARABLE_MODEL_TYPES, so callers see them as non-VarPro candidates and route to the general solver.