84 static constexpr void init(
Pred& p,
Tree const& t)
89 [[nodiscard]]
static constexpr bool returnable(
Pred const& p,
Tree const& t,
92 if constexpr (PredicateCompare::EQUAL == PC) {
93 return t.cost(n) == p.cost;
94 }
else if constexpr (PredicateCompare::NOT_EQUAL == PC) {
95 return t.cost(n) != p.cost;
96 }
else if constexpr (PredicateCompare::LESS_EQUAL == PC) {
97 return t.cost(n) <= p.cost;
98 }
else if constexpr (PredicateCompare::GREATER_EQUAL == PC) {
99 return t.cost(n) >= p.cost;
100 }
else if constexpr (PredicateCompare::LESS == PC) {
101 return t.cost(n) < p.cost;
102 }
else if constexpr (PredicateCompare::GREATER == PC) {
103 return t.cost(n) > p.cost;
107 template <
class Tree>
108 [[nodiscard]]
static constexpr bool traversable(
Pred const& p,
Tree const& t,
111 switch (t.costPropagationCriteria()) {
112 case CostPropagationCriteria::MIN:
113 if constexpr (PredicateCompare::EQUAL == PC) {
114 return t.cost(n) <= p.cost;
115 }
else if constexpr (PredicateCompare::NOT_EQUAL == PC) {
117 }
else if constexpr (PredicateCompare::LESS_EQUAL == PC) {
118 return t.cost(n) <= p.cost;
119 }
else if constexpr (PredicateCompare::GREATER_EQUAL == PC) {
121 }
else if constexpr (PredicateCompare::LESS == PC) {
122 return t.cost(n) < p.cost;
123 }
else if constexpr (PredicateCompare::GREATER == PC) {
126 case CostPropagationCriteria::MAX:
127 if constexpr (PredicateCompare::EQUAL == PC) {
128 return t.cost(n) >= p.cost;
129 }
else if constexpr (PredicateCompare::NOT_EQUAL == PC) {
131 }
else if constexpr (PredicateCompare::LESS_EQUAL == PC) {
133 }
else if constexpr (PredicateCompare::GREATER_EQUAL == PC) {
134 return t.cost(n) >= p.cost;
135 }
else if constexpr (PredicateCompare::LESS == PC) {
137 }
else if constexpr (PredicateCompare::GREATER == PC) {
138 return t.cost(n) > p.cost;
140 case CostPropagationCriteria::MEAN:
return true;
141 case CostPropagationCriteria::NONE:
return true;