pub struct UnifiedFitConfig { /* private fields */ }Expand description
Unified fit configuration for all data types and solvers.
Carries both transmission and counts background configs, and uses
SolverConfig (which embeds solver-specific tuning).
Implementations§
Source§impl UnifiedFitConfig
impl UnifiedFitConfig
Sourcepub fn new(
energies: Vec<f64>,
resonance_data: Vec<ResonanceData>,
isotope_names: Vec<String>,
temperature_k: f64,
resolution: Option<ResolutionFunction>,
initial_densities: Vec<f64>,
) -> Result<Self, FitConfigError>
pub fn new( energies: Vec<f64>, resonance_data: Vec<ResonanceData>, isotope_names: Vec<String>, temperature_k: f64, resolution: Option<ResolutionFunction>, initial_densities: Vec<f64>, ) -> Result<Self, FitConfigError>
Construct a new config with validation.
pub fn with_solver(self, solver: SolverConfig) -> Self
pub fn with_fit_temperature(self, v: bool) -> Self
pub fn with_compute_covariance(self, v: bool) -> Self
pub fn with_transmission_background(self, bg: BackgroundConfig) -> Self
pub fn with_counts_background(self, bg: CountsBackgroundConfig) -> Self
pub fn with_precomputed_cross_sections(self, xs: Arc<Vec<Vec<f64>>>) -> Self
pub fn with_precomputed_base_xs(self, xs: Arc<Vec<Vec<f64>>>) -> Self
Sourcepub fn with_groups(
self,
groups: &[(&IsotopeGroup, &[ResonanceData])],
initial_densities: Vec<f64>,
) -> Result<Self, FitConfigError>
pub fn with_groups( self, groups: &[(&IsotopeGroup, &[ResonanceData])], initial_densities: Vec<f64>, ) -> Result<Self, FitConfigError>
Configure isotope groups with ratio constraints.
Each group binds multiple isotopes to one fitted density parameter.
groups is a slice of (IsotopeGroup, member_resonance_data) pairs.
initial_densities must have one entry per group.
Replaces the existing per-isotope configuration with the expanded group mapping (flattened resonance_data + density_indices + density_ratios).
pub fn energies(&self) -> &[f64]
pub fn resonance_data(&self) -> &[ResonanceData]
pub fn isotope_names(&self) -> &[String]
pub fn temperature_k(&self) -> f64
pub fn resolution(&self) -> Option<&ResolutionFunction>
pub fn initial_densities(&self) -> &[f64]
pub fn solver(&self) -> &SolverConfig
pub fn fit_temperature(&self) -> bool
pub fn transmission_background(&self) -> Option<&BackgroundConfig>
pub fn counts_background(&self) -> Option<&CountsBackgroundConfig>
pub fn precomputed_cross_sections(&self) -> Option<&Arc<Vec<Vec<f64>>>>
Sourcepub fn n_density_params(&self) -> usize
pub fn n_density_params(&self) -> usize
Number of density parameters (one per group or per isotope).
Trait Implementations§
Source§impl Clone for UnifiedFitConfig
impl Clone for UnifiedFitConfig
Source§fn clone(&self) -> UnifiedFitConfig
fn clone(&self) -> UnifiedFitConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for UnifiedFitConfig
impl RefUnwindSafe for UnifiedFitConfig
impl Send for UnifiedFitConfig
impl Sync for UnifiedFitConfig
impl Unpin for UnifiedFitConfig
impl UnwindSafe for UnifiedFitConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more