MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / possInfRelDiff

Function possInfRelDiff

highs/mip/HighsMipSolverData.cpp:2843–2860  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2841}
2842
2843static double possInfRelDiff(const double v0, const double v1,
2844 const double den) {
2845 double rel_diff;
2846 if (std::fabs(v0) == kHighsInf) {
2847 if (std::fabs(v1) == kHighsInf) {
2848 rel_diff = 0;
2849 } else {
2850 rel_diff = kHighsInf;
2851 }
2852 } else {
2853 if (std::fabs(v1) == kHighsInf) {
2854 rel_diff = kHighsInf;
2855 } else {
2856 rel_diff = std::fabs(v1 - v0) / std::max(1.0, std::fabs(den));
2857 }
2858 }
2859 return rel_diff;
2860}
2861
2862void HighsMipSolverData::updatePrimalDualIntegral(const double from_lower_bound,
2863 const double to_lower_bound,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected