Skip to main content

Module inference

Module inference 

Source
Expand description

Runtime dimension inference for expression trees. Runtime dimension inference for symbolic expressions.

Given a mapping from variable names to physical dimensions, computes the dimension of an arbitrary expression by walking the expression tree.

This is used for:

  • Validating from_ex assertions in debug builds
  • Debugging dimension errors interactively
  • Cross-checking symbolic derivations

Structs§

DimMap
Maps symbolic variable names to their physical dimensions.

Functions§

assert_dimension
Infer the dimension and assert it matches the expected dimension.
check_dimensions
Check whether an expression is dimensionally consistent without returning the computed dimension.
infer_dimension
Infer the physical dimension of an expression.