Function sequant::pop_tensor¶
Defined in File expr.cpp
Function Documentation¶
-
std::optional<ExprPtr> sequant::pop_tensor(ExprPtr &expression, std::wstring_view label)¶
Searches for tensors with the given label and removes them from the given expression Note: The function assumes that there don’t exist multiple tensors of that name that differ in their indexing.
- Parameters:
expression – The expression to modify
label – The label of the tensor that shall be removed
- Returns:
The removed tensor, if any occurrance has been found