Function sequant::extract_external_indices

Function Documentation

inline container::set<Index> sequant::extract_external_indices(const Expr &expr)

extracts external indices of an expanded expression

External indices appear only once in an expression

Parameters:

expr – an expression

Throws:

std::invalid_argument – if any of expr subexpressions is a Sum

Returns:

external indices

Pre:

expr has been expanded (i.e. cannot contain a Sum as a subexpression)