14#ifndef OR_TOOLS_GLOP_ENTERING_VARIABLE_H_
15#define OR_TOOLS_GLOP_ENTERING_VARIABLE_H_
21#include "absl/random/bit_gen_ref.h"
62 bool nothing_to_recompute,
const UpdateRow& update_row,
63 Fractional cost_variation, std::vector<ColIndex>* bound_flip_candidates,
64 ColIndex* entering_col);
71 bool nothing_to_recompute,
const UpdateRow& update_row,
72 Fractional cost_variation, ColIndex* entering_col);
77 void SetRandom(absl::BitGenRef random) { random_ = random; }
80 std::string
StatString()
const {
return stats_.StatString(); }
93 absl::BitGenRef random_;
103 num_perfect_ties(
"num_perfect_ties", this) {}
112 std::vector<ColIndex> equivalent_entering_choices_;
116 struct ColWithRatio {
117 ColWithRatio() =
default;
119 : col(_col), ratio(reduced_cost / coeff_m), coeff_magnitude(coeff_m) {}
122 bool operator<(
const ColWithRatio& other)
const {
123 if (ratio == other.ratio) {
124 if (coeff_magnitude == other.coeff_magnitude) {
125 return col > other.col;
127 return coeff_magnitude < other.coeff_magnitude;
129 return ratio > other.ratio;
138 std::vector<ColWithRatio> breakpoints_;
141 int64_t num_operations_ = 0;
Statistic on the distribution of a sequence of integers.
Base class to print a nice summary of a group of statistics.
void SetParameters(const GlopParameters ¶meters)
Sets the parameters.
double DeterministicTime() const
EnteringVariable & operator=(const EnteringVariable &)=delete
std::string StatString() const
Stats related functions.
ABSL_MUST_USE_RESULT Status DualChooseEnteringColumn(bool nothing_to_recompute, const UpdateRow &update_row, Fractional cost_variation, std::vector< ColIndex > *bound_flip_candidates, ColIndex *entering_col)
void SetRandom(absl::BitGenRef random)
EnteringVariable(const EnteringVariable &)=delete
This type is neither copyable nor movable.
ABSL_MUST_USE_RESULT Status DualPhaseIChooseEnteringColumn(bool nothing_to_recompute, const UpdateRow &update_row, Fractional cost_variation, ColIndex *entering_col)
EnteringVariable(const VariablesInfo &variables_info, absl::BitGenRef random, ReducedCosts *reduced_costs)
Takes references to the linear program data we need.
static double DeterministicTimeForFpOperations(int64_t n)
In SWIG mode, we don't want anything besides these top-level includes.