gtopt::CutTag struct

A (class_name, constraint_name) pair that identifies the kind of cut a SparseRow represents. Bundling the two metadata strings makes them move together at every cut-construction site — previously each builder hand-set the two fields independently, which produced subtle mismatches when one rename forgot the other. All concrete tags are declared as namespace-scope constexpr CutTag sddp_*_tag constants below; call sites use sddp_<x>_tag.apply_to(row) instead of two assignments.

Public functions

auto apply_to(SparseRow& row) const -> SparseRow& noexcept

Public variables

std::string_view class_name
std::string_view constraint_name

Function documentation

SparseRow& gtopt::CutTag::apply_to(SparseRow& row) const noexcept

Stamp this tag's identity onto a SparseRow. Returns the row reference for fluent chaining at call sites that also set variable_uid / context immediately after.