Enum dypdl::expression::IntegerExpression
source · pub enum IntegerExpression {
Show 14 variants
Constant(Integer),
Variable(usize),
ResourceVariable(usize),
Cost,
UnaryOperation(UnaryOperator, Box<IntegerExpression>),
BinaryOperation(BinaryOperator, Box<IntegerExpression>, Box<IntegerExpression>),
Cardinality(SetExpression),
Length(VectorExpression),
Table(Box<NumericTableExpression<Integer>>),
If(Box<Condition>, Box<IntegerExpression>, Box<IntegerExpression>),
FromContinuous(CastOperator, Box<ContinuousExpression>),
Last(Box<IntegerVectorExpression>),
At(Box<IntegerVectorExpression>, ElementExpression),
Reduce(ReduceOperator, Box<IntegerVectorExpression>),
}Expand description
Integer numeric expression.
Variants§
Constant(Integer)
Constant.
Variable(usize)
Variable index.
ResourceVariable(usize)
Resource variable index.
Cost
The cost of the transitioned state.
UnaryOperation(UnaryOperator, Box<IntegerExpression>)
Unary arithmetic operation.
BinaryOperation(BinaryOperator, Box<IntegerExpression>, Box<IntegerExpression>)
Binary arithmetic operation.
Cardinality(SetExpression)
The cardinality of a set expression.
Length(VectorExpression)
The cardinality of a set expression.
Table(Box<NumericTableExpression<Integer>>)
A constant in an integer table.
If(Box<Condition>, Box<IntegerExpression>, Box<IntegerExpression>)
If-then-else expression, which returns the first one if the condition holds and the second one otherwise.
FromContinuous(CastOperator, Box<ContinuousExpression>)
Conversion from a continuous expression.
Last(Box<IntegerVectorExpression>)
The last value in an integer vector.
At(Box<IntegerVectorExpression>, ElementExpression)
An item in an integer vector.
Reduce(ReduceOperator, Box<IntegerVectorExpression>)
Reduce operation on an integer vector expression.
Implementations§
source§impl IntegerExpression
impl IntegerExpression
sourcepub fn abs(self) -> IntegerExpression
pub fn abs(self) -> IntegerExpression
Returns an expression representing the abstract value.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let expression = IntegerExpression::from(-1);
let expression = expression.abs();
assert_eq!(expression.eval(&state, &model.table_registry), 1);source§impl IntegerExpression
impl IntegerExpression
sourcepub fn floor<T>(x: T) -> IntegerExpressionwhere
ContinuousExpression: From<T>,
pub fn floor<T>(x: T) -> IntegerExpressionwhere ContinuousExpression: From<T>,
Returns an integer expression by taking the floor of the continuous expression.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let expression = ContinuousExpression::from(1.5);
let expression = IntegerExpression::floor(expression);
assert_eq!(expression.eval(&state, &model.table_registry), 1);sourcepub fn ceil<T>(x: T) -> IntegerExpressionwhere
ContinuousExpression: From<T>,
pub fn ceil<T>(x: T) -> IntegerExpressionwhere ContinuousExpression: From<T>,
Returns an integer expression by taking the ceiling of the continuous expression.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let expression = ContinuousExpression::from(1.5);
let expression = IntegerExpression::ceil(expression);
assert_eq!(expression.eval(&state, &model.table_registry), 2);sourcepub fn round<T>(x: T) -> IntegerExpressionwhere
ContinuousExpression: From<T>,
pub fn round<T>(x: T) -> IntegerExpressionwhere ContinuousExpression: From<T>,
Returns an integer expression by rounding the continuous expression.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let expression = ContinuousExpression::from(1.5);
let expression = IntegerExpression::round(expression);
assert_eq!(expression.eval(&state, &model.table_registry), 2);sourcepub fn trunc<T>(x: T) -> IntegerExpressionwhere
ContinuousExpression: From<T>,
pub fn trunc<T>(x: T) -> IntegerExpressionwhere ContinuousExpression: From<T>,
Returns an integer expression by truncating the continuous expression.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let expression = ContinuousExpression::from(1.5);
let expression = IntegerExpression::trunc(expression);
assert_eq!(expression.eval(&state, &model.table_registry), 1);source§impl IntegerExpression
impl IntegerExpression
sourcepub fn eval<U: StateInterface>(
&self,
state: &U,
registry: &TableRegistry
) -> Integer
pub fn eval<U: StateInterface>( &self, state: &U, registry: &TableRegistry ) -> Integer
Returns the evaluation result.
Panics
Panics if the cost of the transition state is used or a min/max reduce operation is performed on an empty set or vector.
Examples
use dypdl::prelude::*;
let mut model = Model::default();
let variable = model.add_integer_variable("variable", 1).unwrap();
let state = model.target.clone();
let expression = IntegerExpression::from(variable);
assert_eq!(expression.eval(&state, &model.table_registry), 1);sourcepub fn eval_cost<U: StateInterface>(
&self,
cost: Integer,
state: &U,
registry: &TableRegistry
) -> Integer
pub fn eval_cost<U: StateInterface>( &self, cost: Integer, state: &U, registry: &TableRegistry ) -> Integer
Returns the evaluation result of a cost expression.
Panics
Panics if a min/max reduce operation is performed on an empty set or vector.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let expression = IntegerExpression::Cost + 1;
assert_eq!(expression.eval_cost(1, &state, &model.table_registry), 2);sourcepub fn simplify(&self, registry: &TableRegistry) -> IntegerExpression
pub fn simplify(&self, registry: &TableRegistry) -> IntegerExpression
Returns a simplified version by precomputation.
Panics
Panics if a min/max reduce operation is performed on an empty set or vector.
Trait Implementations§
source§impl Add<ContinuousExpression> for IntegerExpression
impl Add<ContinuousExpression> for IntegerExpression
source§fn add(self, rhs: ContinuousExpression) -> ContinuousExpression
fn add(self, rhs: ContinuousExpression) -> ContinuousExpression
Returns an expression representing the addition.
§type Output = ContinuousExpression
type Output = ContinuousExpression
+ operator.source§impl Add<ContinuousResourceVariable> for IntegerExpression
impl Add<ContinuousResourceVariable> for IntegerExpression
source§fn add(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
fn add(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
Returns an expression representing the addition.
§type Output = ContinuousExpression
type Output = ContinuousExpression
+ operator.source§impl Add<ContinuousVariable> for IntegerExpression
impl Add<ContinuousVariable> for IntegerExpression
source§fn add(self, rhs: ContinuousVariable) -> ContinuousExpression
fn add(self, rhs: ContinuousVariable) -> ContinuousExpression
Returns an expression representing the addition.
§type Output = ContinuousExpression
type Output = ContinuousExpression
+ operator.source§impl Add<IntegerExpression> for Continuous
impl Add<IntegerExpression> for Continuous
source§fn add(self, rhs: IntegerExpression) -> ContinuousExpression
fn add(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the addition.
§type Output = ContinuousExpression
type Output = ContinuousExpression
+ operator.source§impl Add<IntegerExpression> for ContinuousExpression
impl Add<IntegerExpression> for ContinuousExpression
source§fn add(self, rhs: IntegerExpression) -> ContinuousExpression
fn add(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the addition.
§type Output = ContinuousExpression
type Output = ContinuousExpression
+ operator.source§impl Add<IntegerExpression> for ContinuousResourceVariable
impl Add<IntegerExpression> for ContinuousResourceVariable
source§fn add(self, rhs: IntegerExpression) -> ContinuousExpression
fn add(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the addition.
§type Output = ContinuousExpression
type Output = ContinuousExpression
+ operator.source§impl Add<IntegerExpression> for ContinuousVariable
impl Add<IntegerExpression> for ContinuousVariable
source§fn add(self, rhs: IntegerExpression) -> ContinuousExpression
fn add(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the addition.
§type Output = ContinuousExpression
type Output = ContinuousExpression
+ operator.source§impl Add<IntegerExpression> for Integer
impl Add<IntegerExpression> for Integer
source§fn add(self, rhs: IntegerExpression) -> IntegerExpression
fn add(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the addition.
§type Output = IntegerExpression
type Output = IntegerExpression
+ operator.source§impl Add<IntegerExpression> for IntegerExpression
impl Add<IntegerExpression> for IntegerExpression
source§fn add(self, rhs: Self) -> Self::Output
fn add(self, rhs: Self) -> Self::Output
Returns an expression representing the addition.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let a = IntegerExpression::from(2);
let b = IntegerExpression::from(3);
let expression = a + b;
assert_eq!(expression.eval(&state, &model.table_registry), 5);§type Output = IntegerExpression
type Output = IntegerExpression
+ operator.source§impl Add<IntegerExpression> for IntegerResourceVariable
impl Add<IntegerExpression> for IntegerResourceVariable
source§fn add(self, rhs: IntegerExpression) -> IntegerExpression
fn add(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the addition.
§type Output = IntegerExpression
type Output = IntegerExpression
+ operator.source§impl Add<IntegerExpression> for IntegerVariable
impl Add<IntegerExpression> for IntegerVariable
source§fn add(self, rhs: IntegerExpression) -> IntegerExpression
fn add(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the addition.
§type Output = IntegerExpression
type Output = IntegerExpression
+ operator.source§impl Add<IntegerResourceVariable> for IntegerExpression
impl Add<IntegerResourceVariable> for IntegerExpression
source§fn add(self, rhs: IntegerResourceVariable) -> IntegerExpression
fn add(self, rhs: IntegerResourceVariable) -> IntegerExpression
Returns an expression representing the addition.
§type Output = IntegerExpression
type Output = IntegerExpression
+ operator.source§impl Add<IntegerVariable> for IntegerExpression
impl Add<IntegerVariable> for IntegerExpression
source§fn add(self, rhs: IntegerVariable) -> IntegerExpression
fn add(self, rhs: IntegerVariable) -> IntegerExpression
Returns an expression representing the addition.
§type Output = IntegerExpression
type Output = IntegerExpression
+ operator.source§impl Add<f64> for IntegerExpression
impl Add<f64> for IntegerExpression
source§fn add(self, rhs: Continuous) -> ContinuousExpression
fn add(self, rhs: Continuous) -> ContinuousExpression
Returns an expression representing the addition.
§type Output = ContinuousExpression
type Output = ContinuousExpression
+ operator.source§impl Add<i32> for IntegerExpression
impl Add<i32> for IntegerExpression
source§fn add(self, rhs: Integer) -> IntegerExpression
fn add(self, rhs: Integer) -> IntegerExpression
Returns an expression representing the addition.
§type Output = IntegerExpression
type Output = IntegerExpression
+ operator.source§impl AddDualBound<IntegerExpression> for Model
impl AddDualBound<IntegerExpression> for Model
source§fn add_dual_bound(&mut self, bound: IntegerExpression) -> Result<(), ModelErr>
fn add_dual_bound(&mut self, bound: IntegerExpression) -> Result<(), ModelErr>
source§impl AddEffect<IntegerResourceVariable, IntegerExpression> for Transition
impl AddEffect<IntegerResourceVariable, IntegerExpression> for Transition
source§fn add_effect<V>(
&mut self,
v: IntegerResourceVariable,
expression: V
) -> Result<(), ModelErr>where
IntegerExpression: From<V>,
fn add_effect<V>( &mut self, v: IntegerResourceVariable, expression: V ) -> Result<(), ModelErr>where IntegerExpression: From<V>,
source§impl AddEffect<IntegerVariable, IntegerExpression> for Transition
impl AddEffect<IntegerVariable, IntegerExpression> for Transition
source§fn add_effect<V>(
&mut self,
v: IntegerVariable,
expression: V
) -> Result<(), ModelErr>where
IntegerExpression: From<V>,
fn add_effect<V>( &mut self, v: IntegerVariable, expression: V ) -> Result<(), ModelErr>where IntegerExpression: From<V>,
source§impl CheckExpression<IntegerExpression> for Model
impl CheckExpression<IntegerExpression> for Model
source§fn check_expression(
&self,
expression: &IntegerExpression,
allow_cost: bool
) -> Result<(), ModelErr>
fn check_expression( &self, expression: &IntegerExpression, allow_cost: bool ) -> Result<(), ModelErr>
source§impl Clone for IntegerExpression
impl Clone for IntegerExpression
source§fn clone(&self) -> IntegerExpression
fn clone(&self) -> IntegerExpression
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl ContinuousBinaryOperation<ContinuousExpression> for IntegerExpression
impl ContinuousBinaryOperation<ContinuousExpression> for IntegerExpression
type Output = ContinuousExpression
source§fn pow(self, rhs: ContinuousExpression) -> ContinuousExpression
fn pow(self, rhs: ContinuousExpression) -> ContinuousExpression
source§fn log(self, rhs: ContinuousExpression) -> ContinuousExpression
fn log(self, rhs: ContinuousExpression) -> ContinuousExpression
source§impl ContinuousBinaryOperation<ContinuousResourceVariable> for IntegerExpression
impl ContinuousBinaryOperation<ContinuousResourceVariable> for IntegerExpression
type Output = ContinuousExpression
source§fn pow(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
fn pow(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
source§fn log(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
fn log(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
source§impl ContinuousBinaryOperation<ContinuousVariable> for IntegerExpression
impl ContinuousBinaryOperation<ContinuousVariable> for IntegerExpression
type Output = ContinuousExpression
source§fn pow(self, rhs: ContinuousVariable) -> ContinuousExpression
fn pow(self, rhs: ContinuousVariable) -> ContinuousExpression
source§fn log(self, rhs: ContinuousVariable) -> ContinuousExpression
fn log(self, rhs: ContinuousVariable) -> ContinuousExpression
source§impl ContinuousBinaryOperation<IntegerExpression> for Continuous
impl ContinuousBinaryOperation<IntegerExpression> for Continuous
type Output = ContinuousExpression
source§fn pow(self, rhs: IntegerExpression) -> ContinuousExpression
fn pow(self, rhs: IntegerExpression) -> ContinuousExpression
source§fn log(self, rhs: IntegerExpression) -> ContinuousExpression
fn log(self, rhs: IntegerExpression) -> ContinuousExpression
source§impl ContinuousBinaryOperation<IntegerExpression> for ContinuousExpression
impl ContinuousBinaryOperation<IntegerExpression> for ContinuousExpression
type Output = ContinuousExpression
source§fn pow(self, rhs: IntegerExpression) -> ContinuousExpression
fn pow(self, rhs: IntegerExpression) -> ContinuousExpression
source§fn log(self, rhs: IntegerExpression) -> ContinuousExpression
fn log(self, rhs: IntegerExpression) -> ContinuousExpression
source§impl ContinuousBinaryOperation<IntegerExpression> for ContinuousResourceVariable
impl ContinuousBinaryOperation<IntegerExpression> for ContinuousResourceVariable
type Output = ContinuousExpression
source§fn pow(self, rhs: IntegerExpression) -> ContinuousExpression
fn pow(self, rhs: IntegerExpression) -> ContinuousExpression
source§fn log(self, rhs: IntegerExpression) -> ContinuousExpression
fn log(self, rhs: IntegerExpression) -> ContinuousExpression
source§impl ContinuousBinaryOperation<IntegerExpression> for ContinuousVariable
impl ContinuousBinaryOperation<IntegerExpression> for ContinuousVariable
type Output = ContinuousExpression
source§fn pow(self, rhs: IntegerExpression) -> ContinuousExpression
fn pow(self, rhs: IntegerExpression) -> ContinuousExpression
source§fn log(self, rhs: IntegerExpression) -> ContinuousExpression
fn log(self, rhs: IntegerExpression) -> ContinuousExpression
source§impl ContinuousBinaryOperation<f64> for IntegerExpression
impl ContinuousBinaryOperation<f64> for IntegerExpression
type Output = ContinuousExpression
source§fn pow(self, rhs: Continuous) -> ContinuousExpression
fn pow(self, rhs: Continuous) -> ContinuousExpression
source§fn log(self, rhs: Continuous) -> ContinuousExpression
fn log(self, rhs: Continuous) -> ContinuousExpression
source§impl Debug for IntegerExpression
impl Debug for IntegerExpression
source§impl Default for IntegerExpression
impl Default for IntegerExpression
source§impl Div<ContinuousExpression> for IntegerExpression
impl Div<ContinuousExpression> for IntegerExpression
source§fn div(self, rhs: ContinuousExpression) -> ContinuousExpression
fn div(self, rhs: ContinuousExpression) -> ContinuousExpression
Returns an expression representing the division.
§type Output = ContinuousExpression
type Output = ContinuousExpression
/ operator.source§impl Div<ContinuousResourceVariable> for IntegerExpression
impl Div<ContinuousResourceVariable> for IntegerExpression
source§fn div(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
fn div(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
Returns an expression representing the division.
§type Output = ContinuousExpression
type Output = ContinuousExpression
/ operator.source§impl Div<ContinuousVariable> for IntegerExpression
impl Div<ContinuousVariable> for IntegerExpression
source§fn div(self, rhs: ContinuousVariable) -> ContinuousExpression
fn div(self, rhs: ContinuousVariable) -> ContinuousExpression
Returns an expression representing the division.
§type Output = ContinuousExpression
type Output = ContinuousExpression
/ operator.source§impl Div<IntegerExpression> for Continuous
impl Div<IntegerExpression> for Continuous
source§fn div(self, rhs: IntegerExpression) -> ContinuousExpression
fn div(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the division.
§type Output = ContinuousExpression
type Output = ContinuousExpression
/ operator.source§impl Div<IntegerExpression> for ContinuousExpression
impl Div<IntegerExpression> for ContinuousExpression
source§fn div(self, rhs: IntegerExpression) -> ContinuousExpression
fn div(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the division.
§type Output = ContinuousExpression
type Output = ContinuousExpression
/ operator.source§impl Div<IntegerExpression> for ContinuousResourceVariable
impl Div<IntegerExpression> for ContinuousResourceVariable
source§fn div(self, rhs: IntegerExpression) -> ContinuousExpression
fn div(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the division.
§type Output = ContinuousExpression
type Output = ContinuousExpression
/ operator.source§impl Div<IntegerExpression> for ContinuousVariable
impl Div<IntegerExpression> for ContinuousVariable
source§fn div(self, rhs: IntegerExpression) -> ContinuousExpression
fn div(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the division.
§type Output = ContinuousExpression
type Output = ContinuousExpression
/ operator.source§impl Div<IntegerExpression> for Integer
impl Div<IntegerExpression> for Integer
source§fn div(self, rhs: IntegerExpression) -> IntegerExpression
fn div(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the division.
§type Output = IntegerExpression
type Output = IntegerExpression
/ operator.source§impl Div<IntegerExpression> for IntegerExpression
impl Div<IntegerExpression> for IntegerExpression
source§fn div(self, rhs: Self) -> Self::Output
fn div(self, rhs: Self) -> Self::Output
Returns an expression representing the division.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let a = IntegerExpression::from(2);
let b = IntegerExpression::from(3);
let expression = a / b;
assert_eq!(expression.eval(&state, &model.table_registry), 0);§type Output = IntegerExpression
type Output = IntegerExpression
/ operator.source§impl Div<IntegerExpression> for IntegerResourceVariable
impl Div<IntegerExpression> for IntegerResourceVariable
source§fn div(self, rhs: IntegerExpression) -> IntegerExpression
fn div(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the division.
§type Output = IntegerExpression
type Output = IntegerExpression
/ operator.source§impl Div<IntegerExpression> for IntegerVariable
impl Div<IntegerExpression> for IntegerVariable
source§fn div(self, rhs: IntegerExpression) -> IntegerExpression
fn div(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the division.
§type Output = IntegerExpression
type Output = IntegerExpression
/ operator.source§impl Div<IntegerResourceVariable> for IntegerExpression
impl Div<IntegerResourceVariable> for IntegerExpression
source§fn div(self, rhs: IntegerResourceVariable) -> IntegerExpression
fn div(self, rhs: IntegerResourceVariable) -> IntegerExpression
Returns an expression representing the division.
§type Output = IntegerExpression
type Output = IntegerExpression
/ operator.source§impl Div<IntegerVariable> for IntegerExpression
impl Div<IntegerVariable> for IntegerExpression
source§fn div(self, rhs: IntegerVariable) -> IntegerExpression
fn div(self, rhs: IntegerVariable) -> IntegerExpression
Returns an expression representing the division.
§type Output = IntegerExpression
type Output = IntegerExpression
/ operator.source§impl Div<f64> for IntegerExpression
impl Div<f64> for IntegerExpression
source§fn div(self, rhs: Continuous) -> ContinuousExpression
fn div(self, rhs: Continuous) -> ContinuousExpression
Returns an expression representing the division.
§type Output = ContinuousExpression
type Output = ContinuousExpression
/ operator.source§impl Div<i32> for IntegerExpression
impl Div<i32> for IntegerExpression
source§fn div(self, rhs: Integer) -> IntegerExpression
fn div(self, rhs: Integer) -> IntegerExpression
Returns an expression representing the division.
§type Output = IntegerExpression
type Output = IntegerExpression
/ operator.source§impl From<IntegerExpression> for ContinuousExpression
impl From<IntegerExpression> for ContinuousExpression
source§fn from(v: IntegerExpression) -> Self
fn from(v: IntegerExpression) -> Self
source§impl From<IntegerExpression> for CostExpression
impl From<IntegerExpression> for CostExpression
source§fn from(cost: IntegerExpression) -> Self
fn from(cost: IntegerExpression) -> Self
source§impl From<IntegerResourceVariable> for IntegerExpression
impl From<IntegerResourceVariable> for IntegerExpression
source§fn from(v: IntegerResourceVariable) -> Self
fn from(v: IntegerResourceVariable) -> Self
Returns an expression representing the resource variable.
source§impl From<IntegerVariable> for IntegerExpression
impl From<IntegerVariable> for IntegerExpression
source§fn from(v: IntegerVariable) -> Self
fn from(v: IntegerVariable) -> Self
Returns an expression representing the variable.
source§impl From<i32> for IntegerExpression
impl From<i32> for IntegerExpression
source§impl IfThenElse<IntegerExpression> for Condition
impl IfThenElse<IntegerExpression> for Condition
source§fn if_then_else<U, V>(self, lhs: U, rhs: V) -> IntegerExpressionwhere
IntegerExpression: From<U> + From<V>,
fn if_then_else<U, V>(self, lhs: U, rhs: V) -> IntegerExpressionwhere IntegerExpression: From<U> + From<V>,
a if this condition holds and b otherwise.source§impl MaxMin<ContinuousExpression> for IntegerExpression
impl MaxMin<ContinuousExpression> for IntegerExpression
type Output = ContinuousExpression
source§fn max(self, rhs: ContinuousExpression) -> ContinuousExpression
fn max(self, rhs: ContinuousExpression) -> ContinuousExpression
source§fn min(self, rhs: ContinuousExpression) -> ContinuousExpression
fn min(self, rhs: ContinuousExpression) -> ContinuousExpression
source§impl MaxMin<ContinuousResourceVariable> for IntegerExpression
impl MaxMin<ContinuousResourceVariable> for IntegerExpression
type Output = ContinuousExpression
source§fn max(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
fn max(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
source§fn min(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
fn min(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
source§impl MaxMin<ContinuousVariable> for IntegerExpression
impl MaxMin<ContinuousVariable> for IntegerExpression
type Output = ContinuousExpression
source§fn max(self, rhs: ContinuousVariable) -> ContinuousExpression
fn max(self, rhs: ContinuousVariable) -> ContinuousExpression
source§fn min(self, rhs: ContinuousVariable) -> ContinuousExpression
fn min(self, rhs: ContinuousVariable) -> ContinuousExpression
source§impl MaxMin<IntegerExpression> for Continuous
impl MaxMin<IntegerExpression> for Continuous
type Output = ContinuousExpression
source§fn max(self, rhs: IntegerExpression) -> ContinuousExpression
fn max(self, rhs: IntegerExpression) -> ContinuousExpression
source§fn min(self, rhs: IntegerExpression) -> ContinuousExpression
fn min(self, rhs: IntegerExpression) -> ContinuousExpression
source§impl MaxMin<IntegerExpression> for ContinuousExpression
impl MaxMin<IntegerExpression> for ContinuousExpression
type Output = ContinuousExpression
source§fn max(self, rhs: IntegerExpression) -> ContinuousExpression
fn max(self, rhs: IntegerExpression) -> ContinuousExpression
source§fn min(self, rhs: IntegerExpression) -> ContinuousExpression
fn min(self, rhs: IntegerExpression) -> ContinuousExpression
source§impl MaxMin<IntegerExpression> for ContinuousResourceVariable
impl MaxMin<IntegerExpression> for ContinuousResourceVariable
type Output = ContinuousExpression
source§fn max(self, rhs: IntegerExpression) -> ContinuousExpression
fn max(self, rhs: IntegerExpression) -> ContinuousExpression
source§fn min(self, rhs: IntegerExpression) -> ContinuousExpression
fn min(self, rhs: IntegerExpression) -> ContinuousExpression
source§impl MaxMin<IntegerExpression> for ContinuousVariable
impl MaxMin<IntegerExpression> for ContinuousVariable
type Output = ContinuousExpression
source§fn max(self, rhs: IntegerExpression) -> ContinuousExpression
fn max(self, rhs: IntegerExpression) -> ContinuousExpression
source§fn min(self, rhs: IntegerExpression) -> ContinuousExpression
fn min(self, rhs: IntegerExpression) -> ContinuousExpression
source§impl MaxMin<IntegerExpression> for Integer
impl MaxMin<IntegerExpression> for Integer
type Output = IntegerExpression
source§fn max(self, rhs: IntegerExpression) -> IntegerExpression
fn max(self, rhs: IntegerExpression) -> IntegerExpression
source§fn min(self, rhs: IntegerExpression) -> IntegerExpression
fn min(self, rhs: IntegerExpression) -> IntegerExpression
source§impl MaxMin<IntegerExpression> for IntegerExpression
impl MaxMin<IntegerExpression> for IntegerExpression
source§fn max(self, rhs: Self) -> Self::Output
fn max(self, rhs: Self) -> Self::Output
Returns an expression representing the maximum.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let a = IntegerExpression::from(2);
let b = IntegerExpression::from(3);
let expression = a.max(b);
assert_eq!(expression.eval(&state, &model.table_registry), 3);source§fn min(self, rhs: Self) -> Self::Output
fn min(self, rhs: Self) -> Self::Output
Returns an expression representing the minimum.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let a = IntegerExpression::from(2);
let b = IntegerExpression::from(3);
let expression = a.min(b);
assert_eq!(expression.eval(&state, &model.table_registry), 2);type Output = IntegerExpression
source§impl MaxMin<IntegerExpression> for IntegerResourceVariable
impl MaxMin<IntegerExpression> for IntegerResourceVariable
type Output = IntegerExpression
source§fn max(self, rhs: IntegerExpression) -> IntegerExpression
fn max(self, rhs: IntegerExpression) -> IntegerExpression
source§fn min(self, rhs: IntegerExpression) -> IntegerExpression
fn min(self, rhs: IntegerExpression) -> IntegerExpression
source§impl MaxMin<IntegerExpression> for IntegerVariable
impl MaxMin<IntegerExpression> for IntegerVariable
type Output = IntegerExpression
source§fn max(self, rhs: IntegerExpression) -> IntegerExpression
fn max(self, rhs: IntegerExpression) -> IntegerExpression
source§fn min(self, rhs: IntegerExpression) -> IntegerExpression
fn min(self, rhs: IntegerExpression) -> IntegerExpression
source§impl MaxMin<IntegerResourceVariable> for IntegerExpression
impl MaxMin<IntegerResourceVariable> for IntegerExpression
type Output = IntegerExpression
source§fn max(self, rhs: IntegerResourceVariable) -> IntegerExpression
fn max(self, rhs: IntegerResourceVariable) -> IntegerExpression
source§fn min(self, rhs: IntegerResourceVariable) -> IntegerExpression
fn min(self, rhs: IntegerResourceVariable) -> IntegerExpression
source§impl MaxMin<IntegerVariable> for IntegerExpression
impl MaxMin<IntegerVariable> for IntegerExpression
type Output = IntegerExpression
source§fn max(self, rhs: IntegerVariable) -> IntegerExpression
fn max(self, rhs: IntegerVariable) -> IntegerExpression
source§fn min(self, rhs: IntegerVariable) -> IntegerExpression
fn min(self, rhs: IntegerVariable) -> IntegerExpression
source§impl MaxMin<f64> for IntegerExpression
impl MaxMin<f64> for IntegerExpression
type Output = ContinuousExpression
source§fn max(self, rhs: Continuous) -> ContinuousExpression
fn max(self, rhs: Continuous) -> ContinuousExpression
source§fn min(self, rhs: Continuous) -> ContinuousExpression
fn min(self, rhs: Continuous) -> ContinuousExpression
source§impl MaxMin<i32> for IntegerExpression
impl MaxMin<i32> for IntegerExpression
type Output = IntegerExpression
source§fn max(self, rhs: Integer) -> IntegerExpression
fn max(self, rhs: Integer) -> IntegerExpression
source§fn min(self, rhs: Integer) -> IntegerExpression
fn min(self, rhs: Integer) -> IntegerExpression
source§impl Mul<ContinuousExpression> for IntegerExpression
impl Mul<ContinuousExpression> for IntegerExpression
source§fn mul(self, rhs: ContinuousExpression) -> ContinuousExpression
fn mul(self, rhs: ContinuousExpression) -> ContinuousExpression
Returns an expression representing the multiplication.
§type Output = ContinuousExpression
type Output = ContinuousExpression
* operator.source§impl Mul<ContinuousResourceVariable> for IntegerExpression
impl Mul<ContinuousResourceVariable> for IntegerExpression
source§fn mul(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
fn mul(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
Returns an expression representing the multiplication.
§type Output = ContinuousExpression
type Output = ContinuousExpression
* operator.source§impl Mul<ContinuousVariable> for IntegerExpression
impl Mul<ContinuousVariable> for IntegerExpression
source§fn mul(self, rhs: ContinuousVariable) -> ContinuousExpression
fn mul(self, rhs: ContinuousVariable) -> ContinuousExpression
Returns an expression representing the multiplication.
§type Output = ContinuousExpression
type Output = ContinuousExpression
* operator.source§impl Mul<IntegerExpression> for Continuous
impl Mul<IntegerExpression> for Continuous
source§fn mul(self, rhs: IntegerExpression) -> ContinuousExpression
fn mul(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the multiplication.
§type Output = ContinuousExpression
type Output = ContinuousExpression
* operator.source§impl Mul<IntegerExpression> for ContinuousExpression
impl Mul<IntegerExpression> for ContinuousExpression
source§fn mul(self, rhs: IntegerExpression) -> ContinuousExpression
fn mul(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the multiplication.
§type Output = ContinuousExpression
type Output = ContinuousExpression
* operator.source§impl Mul<IntegerExpression> for ContinuousResourceVariable
impl Mul<IntegerExpression> for ContinuousResourceVariable
source§fn mul(self, rhs: IntegerExpression) -> ContinuousExpression
fn mul(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the multiplication.
§type Output = ContinuousExpression
type Output = ContinuousExpression
* operator.source§impl Mul<IntegerExpression> for ContinuousVariable
impl Mul<IntegerExpression> for ContinuousVariable
source§fn mul(self, rhs: IntegerExpression) -> ContinuousExpression
fn mul(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the multiplication.
§type Output = ContinuousExpression
type Output = ContinuousExpression
* operator.source§impl Mul<IntegerExpression> for Integer
impl Mul<IntegerExpression> for Integer
source§fn mul(self, rhs: IntegerExpression) -> IntegerExpression
fn mul(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the multiplication.
§type Output = IntegerExpression
type Output = IntegerExpression
* operator.source§impl Mul<IntegerExpression> for IntegerExpression
impl Mul<IntegerExpression> for IntegerExpression
source§fn mul(self, rhs: Self) -> Self::Output
fn mul(self, rhs: Self) -> Self::Output
Returns an expression representing the multiplication.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let a = IntegerExpression::from(2);
let b = IntegerExpression::from(3);
let expression = a * b;
assert_eq!(expression.eval(&state, &model.table_registry), 6);§type Output = IntegerExpression
type Output = IntegerExpression
* operator.source§impl Mul<IntegerExpression> for IntegerResourceVariable
impl Mul<IntegerExpression> for IntegerResourceVariable
source§fn mul(self, rhs: IntegerExpression) -> IntegerExpression
fn mul(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the multiplication.
§type Output = IntegerExpression
type Output = IntegerExpression
* operator.source§impl Mul<IntegerExpression> for IntegerVariable
impl Mul<IntegerExpression> for IntegerVariable
source§fn mul(self, rhs: IntegerExpression) -> IntegerExpression
fn mul(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the multiplication.
§type Output = IntegerExpression
type Output = IntegerExpression
* operator.source§impl Mul<IntegerResourceVariable> for IntegerExpression
impl Mul<IntegerResourceVariable> for IntegerExpression
source§fn mul(self, rhs: IntegerResourceVariable) -> IntegerExpression
fn mul(self, rhs: IntegerResourceVariable) -> IntegerExpression
Returns an expression representing the multiplication.
§type Output = IntegerExpression
type Output = IntegerExpression
* operator.source§impl Mul<IntegerVariable> for IntegerExpression
impl Mul<IntegerVariable> for IntegerExpression
source§fn mul(self, rhs: IntegerVariable) -> IntegerExpression
fn mul(self, rhs: IntegerVariable) -> IntegerExpression
Returns an expression representing the multiplication.
§type Output = IntegerExpression
type Output = IntegerExpression
* operator.source§impl Mul<f64> for IntegerExpression
impl Mul<f64> for IntegerExpression
source§fn mul(self, rhs: Continuous) -> ContinuousExpression
fn mul(self, rhs: Continuous) -> ContinuousExpression
Returns an expression representing the multiplication.
§type Output = ContinuousExpression
type Output = ContinuousExpression
* operator.source§impl Mul<i32> for IntegerExpression
impl Mul<i32> for IntegerExpression
source§fn mul(self, rhs: Integer) -> IntegerExpression
fn mul(self, rhs: Integer) -> IntegerExpression
Returns an expression representing the multiplication.
§type Output = IntegerExpression
type Output = IntegerExpression
* operator.source§impl Neg for IntegerExpression
impl Neg for IntegerExpression
source§fn neg(self) -> Self::Output
fn neg(self) -> Self::Output
Returns an expression representing the negative value.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let expression = IntegerExpression::from(1);
let expression = -expression;
assert_eq!(expression.eval(&state, &model.table_registry), -1);§type Output = IntegerExpression
type Output = IntegerExpression
- operator.source§impl PartialEq<IntegerExpression> for IntegerExpression
impl PartialEq<IntegerExpression> for IntegerExpression
source§fn eq(&self, other: &IntegerExpression) -> bool
fn eq(&self, other: &IntegerExpression) -> bool
self and other values to be equal, and is used
by ==.source§impl Rem<ContinuousExpression> for IntegerExpression
impl Rem<ContinuousExpression> for IntegerExpression
source§fn rem(self, rhs: ContinuousExpression) -> ContinuousExpression
fn rem(self, rhs: ContinuousExpression) -> ContinuousExpression
Returns an expression representing the remainder.
§type Output = ContinuousExpression
type Output = ContinuousExpression
% operator.source§impl Rem<ContinuousResourceVariable> for IntegerExpression
impl Rem<ContinuousResourceVariable> for IntegerExpression
source§fn rem(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
fn rem(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
Returns an expression representing the remainder.
§type Output = ContinuousExpression
type Output = ContinuousExpression
% operator.source§impl Rem<ContinuousVariable> for IntegerExpression
impl Rem<ContinuousVariable> for IntegerExpression
source§fn rem(self, rhs: ContinuousVariable) -> ContinuousExpression
fn rem(self, rhs: ContinuousVariable) -> ContinuousExpression
Returns an expression representing the remainder.
§type Output = ContinuousExpression
type Output = ContinuousExpression
% operator.source§impl Rem<IntegerExpression> for Continuous
impl Rem<IntegerExpression> for Continuous
source§fn rem(self, rhs: IntegerExpression) -> ContinuousExpression
fn rem(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the remainder.
§type Output = ContinuousExpression
type Output = ContinuousExpression
% operator.source§impl Rem<IntegerExpression> for ContinuousExpression
impl Rem<IntegerExpression> for ContinuousExpression
source§fn rem(self, rhs: IntegerExpression) -> ContinuousExpression
fn rem(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the remainder.
§type Output = ContinuousExpression
type Output = ContinuousExpression
% operator.source§impl Rem<IntegerExpression> for ContinuousResourceVariable
impl Rem<IntegerExpression> for ContinuousResourceVariable
source§fn rem(self, rhs: IntegerExpression) -> ContinuousExpression
fn rem(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the remainder.
§type Output = ContinuousExpression
type Output = ContinuousExpression
% operator.source§impl Rem<IntegerExpression> for ContinuousVariable
impl Rem<IntegerExpression> for ContinuousVariable
source§fn rem(self, rhs: IntegerExpression) -> ContinuousExpression
fn rem(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the remainder.
§type Output = ContinuousExpression
type Output = ContinuousExpression
% operator.source§impl Rem<IntegerExpression> for Integer
impl Rem<IntegerExpression> for Integer
source§fn rem(self, rhs: IntegerExpression) -> IntegerExpression
fn rem(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the remainder.
§type Output = IntegerExpression
type Output = IntegerExpression
% operator.source§impl Rem<IntegerExpression> for IntegerExpression
impl Rem<IntegerExpression> for IntegerExpression
source§fn rem(self, rhs: Self) -> Self::Output
fn rem(self, rhs: Self) -> Self::Output
Returns an expression representing the remainder.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let a = IntegerExpression::from(2);
let b = IntegerExpression::from(3);
let expression = a % b;
assert_eq!(expression.eval(&state, &model.table_registry), 2);§type Output = IntegerExpression
type Output = IntegerExpression
% operator.source§impl Rem<IntegerExpression> for IntegerResourceVariable
impl Rem<IntegerExpression> for IntegerResourceVariable
source§fn rem(self, rhs: IntegerExpression) -> IntegerExpression
fn rem(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the remainder.
§type Output = IntegerExpression
type Output = IntegerExpression
% operator.source§impl Rem<IntegerExpression> for IntegerVariable
impl Rem<IntegerExpression> for IntegerVariable
source§fn rem(self, rhs: IntegerExpression) -> IntegerExpression
fn rem(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the remainder.
§type Output = IntegerExpression
type Output = IntegerExpression
% operator.source§impl Rem<IntegerResourceVariable> for IntegerExpression
impl Rem<IntegerResourceVariable> for IntegerExpression
source§fn rem(self, rhs: IntegerResourceVariable) -> IntegerExpression
fn rem(self, rhs: IntegerResourceVariable) -> IntegerExpression
Returns an expression representing the remainder.
§type Output = IntegerExpression
type Output = IntegerExpression
% operator.source§impl Rem<IntegerVariable> for IntegerExpression
impl Rem<IntegerVariable> for IntegerExpression
source§fn rem(self, rhs: IntegerVariable) -> IntegerExpression
fn rem(self, rhs: IntegerVariable) -> IntegerExpression
Returns an expression representing the remainder.
§type Output = IntegerExpression
type Output = IntegerExpression
% operator.source§impl Rem<f64> for IntegerExpression
impl Rem<f64> for IntegerExpression
source§fn rem(self, rhs: Continuous) -> ContinuousExpression
fn rem(self, rhs: Continuous) -> ContinuousExpression
Returns an expression representing the remainder.
§type Output = ContinuousExpression
type Output = ContinuousExpression
% operator.source§impl Rem<i32> for IntegerExpression
impl Rem<i32> for IntegerExpression
source§fn rem(self, rhs: Integer) -> IntegerExpression
fn rem(self, rhs: Integer) -> IntegerExpression
Returns an expression representing the remainder.
§type Output = IntegerExpression
type Output = IntegerExpression
% operator.source§impl Sub<ContinuousExpression> for IntegerExpression
impl Sub<ContinuousExpression> for IntegerExpression
source§fn sub(self, rhs: ContinuousExpression) -> ContinuousExpression
fn sub(self, rhs: ContinuousExpression) -> ContinuousExpression
Returns an expression representing the subtraction.
§type Output = ContinuousExpression
type Output = ContinuousExpression
- operator.source§impl Sub<ContinuousResourceVariable> for IntegerExpression
impl Sub<ContinuousResourceVariable> for IntegerExpression
source§fn sub(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
fn sub(self, rhs: ContinuousResourceVariable) -> ContinuousExpression
Returns an expression representing the subtraction.
§type Output = ContinuousExpression
type Output = ContinuousExpression
- operator.source§impl Sub<ContinuousVariable> for IntegerExpression
impl Sub<ContinuousVariable> for IntegerExpression
source§fn sub(self, rhs: ContinuousVariable) -> ContinuousExpression
fn sub(self, rhs: ContinuousVariable) -> ContinuousExpression
Returns an expression representing the subtraction.
§type Output = ContinuousExpression
type Output = ContinuousExpression
- operator.source§impl Sub<IntegerExpression> for Continuous
impl Sub<IntegerExpression> for Continuous
source§fn sub(self, rhs: IntegerExpression) -> ContinuousExpression
fn sub(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the subtraction.
§type Output = ContinuousExpression
type Output = ContinuousExpression
- operator.source§impl Sub<IntegerExpression> for ContinuousExpression
impl Sub<IntegerExpression> for ContinuousExpression
source§fn sub(self, rhs: IntegerExpression) -> ContinuousExpression
fn sub(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the subtraction.
§type Output = ContinuousExpression
type Output = ContinuousExpression
- operator.source§impl Sub<IntegerExpression> for ContinuousResourceVariable
impl Sub<IntegerExpression> for ContinuousResourceVariable
source§fn sub(self, rhs: IntegerExpression) -> ContinuousExpression
fn sub(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the subtraction.
§type Output = ContinuousExpression
type Output = ContinuousExpression
- operator.source§impl Sub<IntegerExpression> for ContinuousVariable
impl Sub<IntegerExpression> for ContinuousVariable
source§fn sub(self, rhs: IntegerExpression) -> ContinuousExpression
fn sub(self, rhs: IntegerExpression) -> ContinuousExpression
Returns an expression representing the subtraction.
§type Output = ContinuousExpression
type Output = ContinuousExpression
- operator.source§impl Sub<IntegerExpression> for Integer
impl Sub<IntegerExpression> for Integer
source§fn sub(self, rhs: IntegerExpression) -> IntegerExpression
fn sub(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the subtraction.
§type Output = IntegerExpression
type Output = IntegerExpression
- operator.source§impl Sub<IntegerExpression> for IntegerExpression
impl Sub<IntegerExpression> for IntegerExpression
source§fn sub(self, rhs: Self) -> Self::Output
fn sub(self, rhs: Self) -> Self::Output
Returns an expression representing the subtraction.
Examples
use dypdl::prelude::*;
let model = Model::default();
let state = model.target.clone();
let a = IntegerExpression::from(2);
let b = IntegerExpression::from(3);
let expression = a - b;
assert_eq!(expression.eval(&state, &model.table_registry), -1);§type Output = IntegerExpression
type Output = IntegerExpression
- operator.source§impl Sub<IntegerExpression> for IntegerResourceVariable
impl Sub<IntegerExpression> for IntegerResourceVariable
source§fn sub(self, rhs: IntegerExpression) -> IntegerExpression
fn sub(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the subtraction.
§type Output = IntegerExpression
type Output = IntegerExpression
- operator.source§impl Sub<IntegerExpression> for IntegerVariable
impl Sub<IntegerExpression> for IntegerVariable
source§fn sub(self, rhs: IntegerExpression) -> IntegerExpression
fn sub(self, rhs: IntegerExpression) -> IntegerExpression
Returns an expression representing the subtraction.
§type Output = IntegerExpression
type Output = IntegerExpression
- operator.source§impl Sub<IntegerResourceVariable> for IntegerExpression
impl Sub<IntegerResourceVariable> for IntegerExpression
source§fn sub(self, rhs: IntegerResourceVariable) -> IntegerExpression
fn sub(self, rhs: IntegerResourceVariable) -> IntegerExpression
Returns an expression representing the subtraction.
§type Output = IntegerExpression
type Output = IntegerExpression
- operator.source§impl Sub<IntegerVariable> for IntegerExpression
impl Sub<IntegerVariable> for IntegerExpression
source§fn sub(self, rhs: IntegerVariable) -> IntegerExpression
fn sub(self, rhs: IntegerVariable) -> IntegerExpression
Returns an expression representing the subtraction.
§type Output = IntegerExpression
type Output = IntegerExpression
- operator.source§impl Sub<f64> for IntegerExpression
impl Sub<f64> for IntegerExpression
source§fn sub(self, rhs: Continuous) -> ContinuousExpression
fn sub(self, rhs: Continuous) -> ContinuousExpression
Returns an expression representing the subtraction.
§type Output = ContinuousExpression
type Output = ContinuousExpression
- operator.source§impl Sub<i32> for IntegerExpression
impl Sub<i32> for IntegerExpression
source§fn sub(self, rhs: Integer) -> IntegerExpression
fn sub(self, rhs: Integer) -> IntegerExpression
Returns an expression representing the subtraction.
§type Output = IntegerExpression
type Output = IntegerExpression
- operator.