ReactionExpression#

class montepy.data_inputs.tally_multiplier.ReactionExpression(left: ReactionExpression, operator: ReactionOperator, right: ReactionExpression)#

Bases: object

A binary expression tree for one FM reaction list.

Modeled on montepy.surfaces.half_space.HalfSpace (left/operator/right, &/|/~ there → */+/- here). Python’s own operator precedence (* binds tighter than +/-) gives MCNP’s “multiply first” reaction-list rule for free: Reaction(16) * Reaction(103) + Reaction(104) builds (16*103) + 104 with no custom precedence-climbing code.

Added in version 1.6.0b2.

Attributes:

left

The left side of this expression.

node

The syntax node for this reaction expression.

operator

The ReactionOperator joining the two sides.

right

The right side of this expression.

Parameters:
property left#

The left side of this expression.

property node: ListNode#

The syntax node for this reaction expression.

Added in version 1.6.0b3.

property operator#

The ReactionOperator joining the two sides.

property right#

The right side of this expression.