Expressions
Expression types represent computed values. They are used as field values throughout the specification wherever a numeric, complex, or boolean value is required.
For a summary of the expression type hierarchy, see Abstract Types.
Numeric Expressions
NumericLiteral
Defines a real-valued literal number.
Inherits from: NumericExpression
Fields
| name | type | description |
|---|---|---|
| Value | double | The literal value. |
ComplexRealValue
Isolates the real part of a complex expression.
Inherits from: NumericExpression
Fields
| name | type | description |
|---|---|---|
| Operand | ComplexExpression | The complex expression to take the real part of. |
ComplexImaginaryValue
Isolates the imaginary part of a complex expression.
Inherits from: NumericExpression
Fields
| name | type | description |
|---|---|---|
| Operand | ComplexExpression | The complex expression to take the imaginary part of. |
NumericConditional
A numeric conditional expression.
Inherits from: NumericExpression
Fields
| name | type | description |
|---|---|---|
| Guard | BooleanExpression | Determines the case of the conditional. |
| TrueCase | NumericExpression | Output if the guard is true. |
| FalseCase | NumericExpression | Output if the guard is false. |
BinaryNumericOperation
A binary operation between two numeric expressions.
Inherits from: NumericExpression
Fields
| name | type | description |
|---|---|---|
| Operator | BinaryNumericOperators | Operation to perform. |
| Lhs | NumericExpression | Left-hand side of the expression. |
| Rhs | NumericExpression | Right-hand side of the expression. |
BinaryNumericOperators
An enumeration for binary numeric operators.
Add— addition: \(a + b\)Subtract— subtraction: \(a - b\)Multiply— multiplication: \(a \times b\)
Complex Expressions
ComplexDotProduct
Defines a dot product operation between two complex ranges.
Inherits from: ComplexExpression
Note
The two ranges must have the same size, otherwise an exception will be raised.
Fields
| name | type | description |
|---|---|---|
| LHS | ComplexRangeExpression | Range on the left-hand side, e.g. a measured time-trace. |
| RHS | ComplexRangeExpression | Range on the right-hand side, e.g. a weights array for demodulation. |
ComplexConditional
A complex conditional expression.
Inherits from: ComplexExpression
Fields
| name | type | description |
|---|---|---|
| Guard | BooleanExpression | Determines the case of the conditional. |
| TrueCase | ComplexExpression | Output if the guard is true. |
| FalseCase | ComplexExpression | Output if the guard is false. |
BinaryComplexOperation
A binary operation between two complex expressions.
Inherits from: ComplexExpression
Fields
| name | type | description |
|---|---|---|
| Operator | BinaryComplexOperators | Operation to perform. |
| Lhs | ComplexExpression | Left-hand side of the expression. |
| Rhs | ComplexExpression | Right-hand side of the expression. |
BinaryComplexOperators
An enumeration for binary complex operators.
Add— addition between two complex expressions.Subtract— subtraction between two complex expressions.Multiply— multiplication between two complex expressions.
Boolean Expressions
ComparisonOperation
A boolean expression that defines a comparison between two numeric values.
Inherits from: BooleanExpression
Fields
| name | type | description |
|---|---|---|
| Operator | ComparisonOperators | Comparison operation to perform. |
| LHS | NumericExpression | Left-hand side of the comparison. |
| RHS | NumericExpression | Right-hand side of the comparison. |
ComparisonOperators
An enumeration for comparison operators.
LessThan— \(a < b\)GreaterThan— \(a > b\)
BooleanConditional
A boolean conditional expression.
Inherits from: BooleanExpression
Fields
| name | type | description |
|---|---|---|
| Guard | BooleanExpression | Determines the case of the conditional. |
| TrueCase | BooleanExpression | Output if the guard is true. |
| FalseCase | BooleanExpression | Output if the guard is false. |