Enum ExprNode
#[non_exhaustive]pub enum ExprNode {
Show 39 variants
CoordinateMapFactorAction {
value: ExprId,
parameter: ExprId,
directions: Vec<ExprId>,
},
CoordinateMapFactor {
factor: CoordinateMapFactor,
source: Vec<ExprId>,
at: Vec<(ExprId, ExprId)>,
},
Pullback {
value: ExprId,
source: Vec<ExprId>,
at: Vec<(ExprId, ExprId)>,
},
Evaluate {
value: ExprId,
at: Vec<(ExprId, ExprId)>,
side: Option<BoundarySide>,
},
Require {
condition: ExprId,
value: ExprId,
},
Select {
condition: ExprId,
then_value: ExprId,
else_value: ExprId,
},
Compare(ComparisonOp, ExprId, ExprId),
Not(ExprId),
And(ExprId, ExprId),
Or(ExprId, ExprId),
Constant(ValueLiteral),
Symbol(SymbolRef),
Array {
elements: Vec<ExprId>,
},
Index {
value: ExprId,
index: u32,
},
Complex {
real: ExprId,
imag: ExprId,
},
Sample {
value: ExprId,
clock: Id<ClockDomain>,
},
Hold(ExprId),
Neg(ExprId),
Add(ExprId, ExprId),
Sub(ExprId, ExprId),
Mul(ExprId, ExprId),
Div(ExprId, ExprId),
Quotient(ExprId, ExprId),
Remainder(ExprId, ExprId),
Ordinal(ExprId),
ToReal(ExprId),
ToInteger(ExprId),
PowI(ExprId, i32),
UnaryMath(UnaryMathFunction, ExprId),
FiniteUnary(FiniteUnaryOperation, ExprId),
FiniteBinary(FiniteBinaryOperation, ExprId, ExprId),
Gradient(ExprId),
CoordinatePartial {
value: ExprId,
wrt: ExprId,
},
Divergence(ExprId),
SymmetricPart(ExprId),
IsotropicLift(ExprId),
Trace {
value: ExprId,
on: Id<Domain>,
},
NormalComponent {
value: ExprId,
on: Id<Domain>,
},
PureOperatorApplication(PureOperatorApplication),
}Description
One node in a topologically ordered expression DAG.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CoordinateMapFactorAction
Directional derivative of a coordinate-map factor. Directions are mapped-row changes per unit of the explicit parameter.
CoordinateMapFactor
A local differential factor derived from the map expressions.
Fields
factor: CoordinateMapFactorSigned determinant, invertible volume scale, or orientation.
Pullback
Pull an invariant scalar back along a coordinate map. The source selectors and target bindings define the map within this DAG.
Fields
Evaluate
Evaluate at given coordinate values, without interpolation or extrapolation.
Fields
side: Option<BoundarySide>One-sided reconstruction request on a one-dimensional support.
Require
Demand a Boolean domain condition; false rejects before demanding the value.
Select
Demand the Boolean condition, then only the selected value arm. Both arms remain statically typed and retain their dependencies.
Compare(ComparisonOp, ExprId, ExprId)
Scalar comparison retaining exact operand domains.
Not(ExprId)
Boolean negation.
And(ExprId, ExprId)
Short-circuit Boolean conjunction.
Or(ExprId, ExprId)
Short-circuit Boolean disjunction.
Constant(ValueLiteral)
Constant with its full mathematical type.
Symbol(SymbolRef)
Kernel symbol reference.
Array
Construct ordered outer channel-array elements.
Index
Select one outer channel element by zero-based index.
Complex
Construct a complex scalar from real and imaginary scalar expressions.
Sample
Sample a continuous value on the given clock.
Hold(ExprId)
Continuous read of an explicitly initialized and updated clocked State.
Neg(ExprId)
Unary negation.
Add(ExprId, ExprId)
Addition.
Sub(ExprId, ExprId)
Subtraction.
Mul(ExprId, ExprId)
Multiplication.
Div(ExprId, ExprId)
Division.
Quotient(ExprId, ExprId)
Exact integer quotient, truncating toward zero.
Remainder(ExprId, ExprId)
Exact integer remainder with the dividend sign.
Ordinal(ExprId)
Integer ordinal of a nominal index.
ToReal(ExprId)
Explicit integer scalar to real conversion.
ToInteger(ExprId)
Checked integral real scalar to integer conversion.
PowI(ExprId, i32)
Integer power.
UnaryMath(UnaryMathFunction, ExprId)
Apply one dimension-aware unary mathematical function.
FiniteUnary(FiniteUnaryOperation, ExprId)
Coordinate dualization or orthonormal adjoint, preserving the finite bases.
FiniteBinary(FiniteBinaryOperation, ExprId, ExprId)
Typed finite application, composition, or dual pairing.
Gradient(ExprId)
Physical-space gradient. The operand’s continuous Domain determines the appended spatial axis.
CoordinatePartial
Coordinate partial derivative, kept symbolic until a numerical representation
supplies it. wrt must be a Coordinate symbol.
Divergence(ExprId)
Physical-space divergence, contracting the final spatial axis.
SymmetricPart(ExprId)
Symmetric part of a square Cartesian rank-two tensor.
IsotropicLift(ExprId)
Lift a supported invariant scalar to its isotropic Cartesian tensor.
Trace
Full trace on a boundary or physical-interface Domain.
Fields
NormalComponent
Normal contraction on a boundary or physical-interface Domain. Exterior boundaries use the parent-outward normal; physical interfaces use the common normal of their first declared boundary.
Fields
PureOperatorApplication(PureOperatorApplication)
Apply one expression-local, content-addressed pure definition.
Implementations§
§impl ExprNode
impl ExprNode
pub fn try_for_each_operand<E>(
&self,
visit: impl FnMut(ExprId) -> Result<(), E>,
) -> Result<(), E>
pub fn try_for_each_operand<E>( &self, visit: impl FnMut(ExprId) -> Result<(), E>, ) -> Result<(), E>
Visit every direct expression operand in its declared order. Node-local metadata and nested pure-operator definitions are not operands.
§Errors
Stops at and returns the first visitor error.
Trait Implementations§
§impl Clone for ExprNode
impl Clone for ExprNode
§impl Debug for ExprNode
impl Debug for ExprNode
§impl PartialEq for ExprNode
impl PartialEq for ExprNode
§fn eq(&self, other: &ExprNode) -> bool
fn eq(&self, other: &ExprNode) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExprNode
Auto Trait Implementations§
impl Freeze for ExprNode
impl RefUnwindSafe for ExprNode
impl Send for ExprNode
impl Sync for ExprNode
impl Unpin for ExprNode
impl UnsafeUnpin for ExprNode
impl UnwindSafe for ExprNode
Blanket Implementations§
Source§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
§fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> From<T> for T
impl<T> From<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
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>
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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Same for T
impl<T> Same for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.