Enum ai_kit::constraints::NumericalConstraint
[−]
[src]
pub enum NumericalConstraint {
Set {
variable: String,
constant: f64,
},
Sum {
first: String,
second: String,
third: String,
},
Mul {
first: String,
second: String,
third: String,
},
GreaterThan {
left: String,
right: String,
},
NotEqual {
left: String,
right: String,
},
}Variants
Set?x = CONSTANT
Fields of Set
variable: String | |
constant: f64 |
Sum?x + ?y = ?z
Fields of Sum
first: String | |
second: String | |
third: String |
Mul?x * ?y = ?z
Fields of Mul
first: String | |
second: String | |
third: String |
GreaterThan?x > ?y
Fields of GreaterThan
left: String | |
right: String |
NotEqual?x != ?y
Fields of NotEqual
left: String | |
right: String |
Methods
impl NumericalConstraint[src]
fn solve<T: ConstraintValue>(&self, bindings: &Bindings<T>) -> SolveResult<T>
Try to solve this constraint using the information in the bindings
fn rename_variables(&self, renamed_variables: &HashMap<String, String>) -> Self
fn variables(&self) -> Vec<String>
Trait Implementations
impl Clone for NumericalConstraint[src]
fn clone(&self) -> NumericalConstraint
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Debug for NumericalConstraint[src]
impl PartialEq for NumericalConstraint[src]
fn eq(&self, __arg_0: &NumericalConstraint) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &NumericalConstraint) -> bool
This method tests for !=.
impl Eq for NumericalConstraint[src]
impl PartialOrd for NumericalConstraint[src]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool1.0.0
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Rhs) -> bool1.0.0
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Rhs) -> bool1.0.0
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Rhs) -> bool1.0.0
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more