Template Function sequant::binarize(ExprPtr const&, IndexSet const&)

Function Documentation

template<typename ExprT = EvalExpr>
FullBinaryNode<ExprT> sequant::binarize(ExprPtr const &expr, IndexSet const &external = {})

Creates a binary tree for evaluation.

Parameters:
  • expr – an expression to binarize

  • external – additional external (uncontracted) indices; only needed for indices that appear more than once in expr (i.e., hyperindices) but should not be contracted. Indices appearing once are automatically treated as external.