24 unsigned int const maxIrrelevant
35 return minSumInOppositeWindows > (minInMainWindow + minInOppositeWindow);
42 using namespace std::string_literals;
47 if (minInOppositeWindow > 0U)
50 if (isSumRequirementRelevant())
53 if ((minInDownstreamWindow > 0U) || requireDownstreamWindow) {
55 if (requireDownstreamWindow)
s+=
"req"s;
58 if ((minInUpstreamWindow > 0U) || requireUpstreamWindow) {
60 if (requireUpstreamWindow)
s+=
"req"s;
63 if (isMainRequirementRelevant() ||
s.empty())
64 s =
"M"s + std::to_string(minInMainWindow) +
s;
72 using namespace std::string_literals;
74 bool const useMain = isMainRequirementRelevant();
75 bool const useSum = isSumRequirementRelevant();
77 std::string
s =
"required:";
79 if (useMain || !useSum)
84 if (minInOppositeWindow > 0U)
87 if (useMain && useSum)
90 if ((minInDownstreamWindow > 0U) || requireDownstreamWindow) {
91 if (minInDownstreamWindow)
94 if (requireDownstreamWindow)
s+=
", mandatory)"s;
98 if ((minInUpstreamWindow > 0U) || requireUpstreamWindow) {
101 if (requireUpstreamWindow)
s+=
", mandatory)"s;
Defines a (sliding) window trigger pattern.
bool isMainRequirementRelevant() const
unsigned int minInMainWindow
unsigned int minSumInOppositeWindows
std::string tag() const
Returns a tag summarizing the pattern.
std::string to_string(WindowPattern const &pattern)
then echo File list $list not found else cat $list while read file do echo $file sed s
bool isSumRequirementRelevant() const
std::string description() const
Returns a description of the pattern.