pub enum NumericExpr {
Number(f64),
FunctionCall(FunctionTerm),
BinaryOp {
op: BinaryOp,
left: Box<NumericExpr>,
right: Box<NumericExpr>,
},
Negate(Box<NumericExpr>),
TotalTime,
Duration,
}Expand description
A numeric expression tree used in preconditions, effects, durations, and metrics.
N-ary PDDL operators like (+ a b c) are desugared into nested binary operations
during parsing, e.g. (+ (+ a b) c).
Variants§
Number(f64)
A numeric literal (e.g. 3.14, 0, 100).
FunctionCall(FunctionTerm)
A reference to a numeric fluent (e.g. (distance ?x ?y)).
BinaryOp
A binary arithmetic operation.
Negate(Box<NumericExpr>)
Unary negation (e.g. (- expr)).
TotalTime
The built-in total-time expression (plan makespan).
Duration
The ?duration variable inside durative action constraints.
Trait Implementations§
Source§impl Clone for NumericExpr
impl Clone for NumericExpr
Source§fn clone(&self) -> NumericExpr
fn clone(&self) -> NumericExpr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NumericExpr
impl Debug for NumericExpr
Source§impl PartialEq for NumericExpr
impl PartialEq for NumericExpr
Source§fn eq(&self, other: &NumericExpr) -> bool
fn eq(&self, other: &NumericExpr) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for NumericExpr
impl Serialize for NumericExpr
impl StructuralPartialEq for NumericExpr
Auto Trait Implementations§
impl Freeze for NumericExpr
impl RefUnwindSafe for NumericExpr
impl Send for NumericExpr
impl Sync for NumericExpr
impl Unpin for NumericExpr
impl UnsafeUnpin for NumericExpr
impl UnwindSafe for NumericExpr
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