pub struct ParameterBound {
pub min: f64,
pub max: f64,
pub max_step_delta: Option<f64>,
}Expand description
Hard safety bounds enforced on a single adaptive parameter before proposal commit.
Fields§
§min: f64Minimum permitted finite parameter value (inclusive).
max: f64Maximum permitted finite parameter value (inclusive).
max_step_delta: Option<f64>Optional maximum absolute change allowed from the currently confirmed value in one proposal.
Implementations§
Source§impl ParameterBound
impl ParameterBound
Sourcepub fn new(
min: f64,
max: f64,
max_step_delta: Option<f64>,
) -> Result<Self, AdaptiveError>
pub fn new( min: f64, max: f64, max_step_delta: Option<f64>, ) -> Result<Self, AdaptiveError>
Constructs a validated finite ParameterBound.
Trait Implementations§
Source§impl Clone for ParameterBound
impl Clone for ParameterBound
impl Copy for ParameterBound
Source§impl Debug for ParameterBound
impl Debug for ParameterBound
Source§impl<'de> Deserialize<'de> for ParameterBound
impl<'de> Deserialize<'de> for ParameterBound
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ParameterBound
impl PartialEq for ParameterBound
Source§impl Serialize for ParameterBound
impl Serialize for ParameterBound
impl StructuralPartialEq for ParameterBound
Auto Trait Implementations§
impl Forget for ParameterBound
impl Freeze for ParameterBound
impl Move for ParameterBound
impl RefUnwindSafe for ParameterBound
impl Send for ParameterBound
impl Sync for ParameterBound
impl Unpin for ParameterBound
impl UnsafeUnpin for ParameterBound
impl UnwindSafe for ParameterBound
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