DomainRulePipeline class
#include <gtopt/domain_rules.hpp>
An ordered set of DomainRules applied as a pipeline.
Public functions
- void add(std::unique_ptr<DomainRule> rule)
- Append a rule (ignored if null).
- auto apply(std::span<double> values, const DomainRuleContext& ctx, int max_passes = 1) const -> int
- auto empty() const -> bool noexcept
- auto size() const -> std::size_t noexcept
Function documentation
int gtopt:: DomainRulePipeline:: apply(std::span<double> values,
const DomainRuleContext& ctx,
int max_passes = 1) const
| Returns | total column values flipped. |
|---|
Apply every rule in order. When max_passes > 1, repeat the whole sequence until a pass flips nothing (a fixpoint) or the cap is hit — rules can interact (mending ramp may break run-length and vice versa), so re-passing converges them.