Function sequant::optimize¶
Defined in File optimize.cpp
Function Documentation¶
-
ExprPtr sequant::optimize(ExprPtr const &expr, bool reorder_sum = true)¶
Optimize the expression using IndexSpace::aproximate_size() for reference index extent.
- Parameters:
expr – Expression to be optimized.
reorder_sum – If true, the summands are reordered so that terms with common sub-expressions appear closer to each other. True by default.
- Returns:
Optimized expression for lower evaluation cost.