pub struct FitParameter {
pub name: Cow<'static, str>,
pub value: f64,
pub lower: f64,
pub upper: f64,
pub fixed: bool,
}Expand description
A single fit parameter with value, bounds, and fixed/free flag.
The name field uses Cow<'static, str> so that static strings
(e.g. "U-238", "temperature_k") avoid heap allocation entirely,
while dynamic strings from format!() still work via the Owned variant.
When a ParameterSet template is cloned per-pixel, Cow::Borrowed names
are copied as a pointer+length (16 bytes, no heap) instead of allocating
a new String on the heap.
Fields§
§name: Cow<'static, str>Parameter name (for reporting).
value: f64Current value.
lower: f64Lower bound (f64::NEG_INFINITY if unbounded).
upper: f64Upper bound (f64::INFINITY if unbounded).
fixed: boolIf true, parameter is held fixed during fitting.
Implementations§
Trait Implementations§
Source§impl Clone for FitParameter
impl Clone for FitParameter
Source§fn clone(&self) -> FitParameter
fn clone(&self) -> FitParameter
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 FitParameter
impl RefUnwindSafe for FitParameter
impl Send for FitParameter
impl Sync for FitParameter
impl Unpin for FitParameter
impl UnsafeUnpin for FitParameter
impl UnwindSafe for FitParameter
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