14#ifndef OR_TOOLS_GLOP_UPDATE_ROW_H_
15#define OR_TOOLS_GLOP_UPDATE_ROW_H_
21#include "absl/types/span.h"
23#include "ortools/glop/parameters.pb.h"
77 return update_row_computed_for_ == leaving_row;
107 const std::string& algorithm);
121 void ComputeUpdatesRowWise();
122 void ComputeUpdatesRowWiseHypersparse();
123 void ComputeUpdatesColumnWise();
124 void ComputeUpdatesForSingleRow(ColIndex row_as_col);
138 std::vector<ColIndex> unit_row_left_inverse_filtered_non_zeros_;
142 int num_non_zeros_ = 0;
148 bool compute_update_row_;
156 unit_row_left_inverse_density(
"unit_row_left_inverse_density", this),
157 unit_row_left_inverse_accuracy(
"unit_row_left_inverse_accuracy",
159 update_row_density(
"update_row_density", this) {}
167 int64_t num_operations_;
170 GlopParameters parameters_;
Statistic on the distribution of a sequence of doubles.
Statistic on the distribution of a sequence of ratios, displayed as %.
Base class to print a nice summary of a group of statistics.
std::string StatString() const
const DenseRow & GetCoefficients() const
const ScatteredRow & ComputeAndGetUnitRowLeftInverse(RowIndex leaving_row)
void SetParameters(const GlopParameters ¶meters)
Sets the algorithm parameters.
void ComputeFullUpdateRow(RowIndex leaving_row, DenseRow *output) const
std::string StatString() const
Returns statistics about this class as a string.
const ScatteredRow & GetUnitRowLeftInverse() const
void ComputeUnitRowLeftInverse(RowIndex leaving_row)
void ComputeUpdateRow(RowIndex leaving_row)
UpdateRow(const UpdateRow &)=delete
This type is neither copyable nor movable.
UpdateRow & operator=(const UpdateRow &)=delete
bool IsComputedFor(RowIndex leaving_row) const
Returns true if ComputeUpdateRow() was called since the last Invalidate().
double DeterministicTime() const
Deterministic time used by the scalar product computation of this class.
Fractional GetCoefficient(ColIndex col) const
UpdateRow(const CompactSparseMatrix &matrix, const CompactSparseMatrix &transposed_matrix, const VariablesInfo &variables_info, const RowToColMapping &basis, const BasisFactorization &basis_factorization)
Takes references to the linear program data we need.
void ComputeUpdateRowForBenchmark(const DenseRow &lhs, const std::string &algorithm)
absl::Span< const ColIndex > GetNonZeroPositions() const
std::vector< ColIndex > ColIndexVector
Vector of row or column indices. Useful to list the non-zero positions.
constexpr RowIndex kInvalidRow(-1)
static double DeterministicTimeForFpOperations(int64_t n)
In SWIG mode, we don't want anything besides these top-level includes.