pub struct ROpBuilder { /* private fields */ }Expand description
Builder struct used to create f values for RCalc::calc from mathematical expressions.
Implementations§
Source§impl ROpBuilder
impl ROpBuilder
Sourcepub fn bound(self, expr: &str) -> Self
pub fn bound(self, expr: &str) -> Self
Add a new bound to the builder, this must be an expression of the form expr op target
where expr is a math expression using R1,…,Rn and supported expressions,
op is one of <, >, <=, >=, ==, != or ~ and target is an f64 value.
For ~ the bound will calculate the difference between the value of expr and target and add
the abs error to the resulting error. For all other ops the bound will compare the value of
expr to target, and if the comparison fails, it will reject the set of proposed values.
Trait Implementations§
Source§impl Default for ROpBuilder
impl Default for ROpBuilder
Source§fn default() -> ROpBuilder
fn default() -> ROpBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ROpBuilder
impl !RefUnwindSafe for ROpBuilder
impl !Send for ROpBuilder
impl !Sync for ROpBuilder
impl Unpin for ROpBuilder
impl !UnwindSafe for ROpBuilder
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> 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