gtopt::LabelMaker class

Constructors, destructors, conversion operators

LabelMaker() defaulted constexpr noexcept
LabelMaker(LpNamesLevel level) explicit constexpr noexcept

Public functions

auto all_col_names_enabled() const -> bool noexcept
True iff all column labels (not just state variables) are generated.
auto col_names_enabled() const -> bool noexcept
auto duplicates_are_errors() const -> bool noexcept
True iff duplicate col/row names must raise an error rather than warn.
auto make_col_label(const SparseCol& col) const -> std::string
auto make_row_label(const SparseRow& row) const -> std::string
auto names_level() const -> LpNamesLevel noexcept
auto row_names_enabled() const -> bool noexcept
True iff row labels should be generated.

Function documentation

bool gtopt::LabelMaker::col_names_enabled() const noexcept

True iff dense column name vectors / name-maps should be generated. State variable I/O uses the StateVariable map (ColIndex-based) directly and does not need column name strings.

std::string gtopt::LabelMaker::make_col_label(const SparseCol& col) const

Generate the label for a column. Returns an empty string when naming is disabled or class_name is empty.

std::string gtopt::LabelMaker::make_row_label(const SparseRow& row) const

Generate the label for a row. Returns an empty string when naming is disabled or class_name is empty.