pub enum ExprNode {
Show 18 variants
RealConst(f64),
ComplexConst(Complex64),
ScalarParam(Parameter),
EventScalar(Arc<str>),
EventP4Component {
name: Arc<str>,
component: P4Component,
},
Unary {
op: UnaryOp,
input: ExprId,
},
Binary {
op: BinaryOp,
lhs: ExprId,
rhs: ExprId,
},
NaryAdd {
terms: Vec<ExprId>,
},
NaryMul {
factors: Vec<ExprId>,
},
Complex {
re: ExprId,
im: ExprId,
},
Vector {
elements: Vec<ExprId>,
},
Matrix {
rows: usize,
cols: usize,
elements: Vec<ExprId>,
},
Component {
input: ExprId,
index: usize,
},
MatrixElement {
input: ExprId,
row: usize,
col: usize,
},
MatMul {
lhs: ExprId,
rhs: ExprId,
},
MatVec {
matrix: ExprId,
vector: ExprId,
},
Dot {
lhs: ExprId,
rhs: ExprId,
},
Solve {
matrix: ExprId,
rhs: ExprId,
},
}Expand description
Serialized node in a topologically ordered ExprGraph.
Variants§
RealConst(f64)
A real constant.
ComplexConst(Complex64)
A complex constant.
ScalarParam(Parameter)
A scalar fit parameter.
EventScalar(Arc<str>)
A named scalar event column.
EventP4Component
One component of a named event four-momentum.
Fields
component: P4ComponentRequested four-momentum component.
Unary
A unary operation.
Binary
A binary operation.
NaryAdd
A sum of zero or more terms.
NaryMul
A product of zero or more factors.
Complex
A complex scalar assembled from real and imaginary expressions.
Vector
A vector assembled from scalar elements.
Matrix
A row-major matrix assembled from scalar elements.
Fields
Component
A vector component selection.
MatrixElement
A matrix element selection.
Fields
MatMul
Matrix-matrix multiplication.
MatVec
Matrix-vector multiplication.
Dot
Vector dot product.
Solve
Solution of a linear system.
Implementations§
Source§impl ExprNode
impl ExprNode
Sourcepub fn from_folded_const(value: Complex64) -> Self
pub fn from_folded_const(value: Complex64) -> Self
Creates the most compact constant-node representation for value.
Sourcepub fn const_value(&self) -> Option<Complex64>
pub fn const_value(&self) -> Option<Complex64>
Returns the node’s scalar constant value, if it is a constant.