Struct IndexSpaceCountRule

Inheritance Relationships

Base Type

Struct Documentation

struct IndexSpaceCountRule : public sequant::ExpressionFilter::Rule

Rule matching expressions that contain (at any depth) a tensor whose number of (non-null) indices in each of the given spaces lies within the respective bounds. Indices in other spaces are not constrained. If patterns are given, the tensor’s label additionally has to fully match one of them.

Public Functions

explicit IndexSpaceCountRule(std::vector<IndexSpaceCount> counts, std::vector<std::wregex> label_patterns = {})
virtual bool matches(const Expr &expr) const override

Public Members

std::vector<IndexSpaceCount> counts_
std::vector<std::wregex> label_patterns_