Struct InlineContext¶
Defined in File eval_expr.cpp
Nested Relationships¶
Nested Types¶
Struct Documentation¶
-
struct InlineContext¶
The definitions of a system of equations and the state of inlining them; see binarize(std::span<const ResultExpr>, const BinarizationOptions&).
Public Functions
-
inline InlineContext(std::span<const ResultExpr> system, container::svector<bool> &consumed)¶
- Parameters:
system – the equations
consumed – receives true for every equation inlined somewhere
-
InlineContext(InlineContext const&) = delete¶
-
InlineContext &operator=(InlineContext const&) = delete¶
-
inline std::optional<TensorMatch> match(Tensor const &leaf) const¶
- Throws:
Exception – if
leafmatches a head but not its symmetries, or spells a conjugate-symmetric head swapped- Returns:
the equation whose tensor head
leafnames, if any; a leaf that spells a bra-ket symmetric head with bra and ket swapped names it too, unless another head with its label matches it as written
-
inline std::optional<std::size_t> match(Variable const &leaf) const¶
- Throws:
Exception – if
leafis conjugated and names a scalar head- Returns:
the equation whose scalar head
leafnames, if any
-
inline EvalExprNode binarize_equation(std::size_t k, BinarizationOptions const &opts, std::size_t &node_counter)¶
- Returns:
the tree of equation
k, with every definition inlined
-
inline EvalExprNode inline_definition(std::size_t k, Tensor const *leaf, BinarizationOptions const &opts, bool swapped = false)¶
- Returns:
the tree of equation
kas a factor in place ofleaf(null for a Variable leaf): its head’s indices renamed toleaf's(the head’s bra to the leaf’s ket and vice versa ifswapped) and every other index of its rhs to a fresh one; not stamped withopts.node_batch_axes
-
inline InlineContext(std::span<const ResultExpr> system, container::svector<bool> &consumed)¶