gtopt/lp_validation.hpp file

Build-time LP numerical validation: thresholds and accumulator.

Provides LpValidationOptions (thresholds for what counts as a "huge" / "tiny" coefficient, bound, RHS, or objective) and LpValidationStats (accumulator that emits one spdlog::warn() per offending kind, capped to avoid million-line spam on truly broken LPs).

The validation is opt-in via LpMatrixOptions::validation. When enabled, every write into the LP (LinearInterface::add_col, add_row, add_rows, set_coeff, set_*, set_obj_coeff, ...) is classified once at insertion time. The cost is one branch + one comparison per coefficient when off, one comparison + one count bump on hits.

This complements (does not replace) the post-flatten stats sweep in lp_stats.hpp: that path runs once at the end and computes global ratios; this path catches the moment a 1e15 coefficient lands on a row, naming the location.

Namespaces

namespace gtopt
namespace spdlog

Classes

struct gtopt::LpValidationOptions
Thresholds + on/off flag for incremental LP validation.
struct gtopt::LpValidationStats
Per-kind counters + bounded list of offenders + max/min trackers.
struct gtopt::LpValidationStats::Offender