14 #ifndef OR_TOOLS_GLOP_BASIS_REPRESENTATION_H_
15 #define OR_TOOLS_GLOP_BASIS_REPRESENTATION_H_
81 void LeftSolveWithDenseEta(
DenseRow* y)
const;
82 void LeftSolveWithSparseEta(
DenseRow* y)
const;
93 const ColIndex eta_col_;
119 void Update(ColIndex entering_col, RowIndex leaving_variable_row,
135 std::vector<EtaMatrix*> eta_matrix_;
159 max_num_updates_ =
parameters.basis_refactorization_period();
160 use_middle_product_form_update_ =
209 ABSL_MUST_USE_RESULT
Status Update(ColIndex entering_col,
210 RowIndex leaving_variable_row,
276 return stats_.StatString() + lu_factorization_.
StatString();
286 Status ComputeFactorization();
290 bool IsIdentityBasis()
const;
295 ABSL_MUST_USE_RESULT
Status
296 MiddleProductFormUpdate(ColIndex entering_col, RowIndex leaving_variable_row);
300 void BumpDeterministicTimeForSolve(
int num_entries)
const;
306 refactorization_interval(
"refactorization_interval", this) {}
312 mutable Stats stats_;
313 GlopParameters parameters_;
316 const CompactSparseMatrix& compact_matrix_;
321 RankOneUpdateFactorization rank_one_factorization_;
323 mutable std::vector<RowIndex> scratchpad_non_zeros_;
328 mutable ScatteredColumn tau_;
346 mutable bool tau_computation_can_be_optimized_;
347 mutable bool tau_is_computed_;
353 mutable CompactSparseMatrix storage_;
354 mutable CompactSparseMatrix right_storage_;
358 bool use_middle_product_form_update_;
359 int max_num_updates_;
361 EtaFactorization eta_factorization_;
362 LuFactorization lu_factorization_;
365 double last_factorization_deterministic_time_ = 0.0;
366 mutable double deterministic_time_;
#define DCHECK(condition)
Fractional ComputeInverseOneNorm() const
BasisFactorization(const CompactSparseMatrix *compact_matrix, const RowToColMapping *basis)
Fractional ComputeInfinityNormConditionNumberUpperBound() const
ABSL_MUST_USE_RESULT Status Refactorize()
Fractional ComputeInverseInfinityNorm() const
Fractional ComputeInfinityNorm() const
const DenseColumn & RightSolveForTau(const ScatteredColumn &a) const
void LeftSolveForUnitRow(ColIndex j, ScatteredRow *y) const
Fractional RightSolveSquaredNorm(const ColumnView &a) const
const ColumnPermutation & GetColumnPermutation() const
Fractional ComputeOneNorm() const
Fractional ComputeOneNormConditionNumber() const
ABSL_MUST_USE_RESULT Status Initialize()
bool IsRefactorized() const
void TemporaryLeftSolveForUnitRow(ColIndex j, ScatteredRow *y) const
ABSL_MUST_USE_RESULT Status Update(ColIndex entering_col, RowIndex leaving_variable_row, const ScatteredColumn &direction)
virtual ~BasisFactorization()
Fractional DualEdgeSquaredNorm(RowIndex row) const
void LeftSolve(ScatteredRow *y) const
void RightSolveForProblemColumn(ColIndex col, ScatteredColumn *d) const
Fractional ComputeInfinityNormConditionNumber() const
void SetColumnPermutationToIdentity()
RowIndex GetNumberOfRows() const
void SetParameters(const GlopParameters ¶meters)
void RightSolve(ScatteredColumn *d) const
double DeterministicTime() const
ABSL_MUST_USE_RESULT Status ForceRefactorization()
std::string StatString() const
RowIndex num_rows() const
void RightSolve(DenseColumn *d) const
void LeftSolve(DenseRow *y) const
virtual ~EtaFactorization()
void SparseLeftSolve(DenseRow *y, ColIndexVector *pos) const
void Update(ColIndex entering_col, RowIndex leaving_variable_row, const ScatteredColumn &direction)
void RightSolve(DenseColumn *d) const
void LeftSolve(DenseRow *y) const
EtaMatrix(ColIndex eta_col, const ScatteredColumn &direction)
void SparseLeftSolve(DenseRow *y, ColIndexVector *pos) const
const ColumnPermutation & GetColumnPermutation() const
void SetColumnPermutationToIdentity()
void SetParameters(const GlopParameters ¶meters)
std::string StatString() const
std::vector< ColIndex > ColIndexVector
StrictITIVector< RowIndex, ColIndex > RowToColMapping
StrictITIVector< RowIndex, Fractional > DenseColumn
StrictITIVector< ColIndex, ColIndex > ColMapping
Collection of objects used to extend the Constraint Solver library.