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_ =
221 ABSL_MUST_USE_RESULT
Status Update(ColIndex entering_col,
222 RowIndex leaving_variable_row,
288 return stats_.StatString() + lu_factorization_.
StatString();
298 Status ComputeFactorization();
302 bool IsIdentityBasis()
const;
307 ABSL_MUST_USE_RESULT
Status 308 MiddleProductFormUpdate(ColIndex entering_col, RowIndex leaving_variable_row);
312 void BumpDeterministicTimeForSolve(
int num_entries)
const;
318 refactorization_interval(
"refactorization_interval", this) {}
324 mutable Stats stats_;
325 GlopParameters parameters_;
328 const CompactSparseMatrix& compact_matrix_;
333 RankOneUpdateFactorization rank_one_factorization_;
335 mutable std::vector<RowIndex> scratchpad_non_zeros_;
340 mutable ScatteredColumn tau_;
358 mutable bool tau_computation_can_be_optimized_;
359 mutable bool tau_is_computed_;
365 mutable CompactSparseMatrix storage_;
366 mutable CompactSparseMatrix right_storage_;
370 bool use_middle_product_form_update_;
371 int max_num_updates_;
373 EtaFactorization eta_factorization_;
374 LuFactorization lu_factorization_;
377 double last_factorization_deterministic_time_ = 0.0;
378 mutable double deterministic_time_;
386 #endif // OR_TOOLS_GLOP_BASIS_REPRESENTATION_H_
BasisFactorization(const CompactSparseMatrix *compact_matrix, const RowToColMapping *basis)
std::string StatString() const
Fractional ComputeOneNormConditionNumber() const
bool IsRefactorized() const
StrictITIVector< RowIndex, ColIndex > RowToColMapping
const ColumnPermutation & GetColumnPermutation() const
Fractional ComputeInfinityNormConditionNumberUpperBound() const
void LeftSolveForUnitRow(ColIndex j, ScatteredRow *y) const
Fractional RightSolveSquaredNorm(const ColumnView &a) const
Fractional DualEdgeSquaredNorm(RowIndex row) const
RowIndex GetNumberOfRows() const
void LeftSolve(DenseRow *y) const
RowIndex num_rows() const
void SetColumnPermutationToIdentity()
void TemporaryLeftSolveForUnitRow(ColIndex j, ScatteredRow *y) const
void RightSolve(ScatteredColumn *d) const
void LeftSolve(ScatteredRow *y) const
ABSL_MUST_USE_RESULT Status ForceRefactorization()
void SparseLeftSolve(DenseRow *y, ColIndexVector *pos) const
void SetColumnPermutationToIdentity()
Fractional ComputeInfinityNorm() const
StrictITIVector< RowIndex, Fractional > DenseColumn
EtaMatrix(ColIndex eta_col, const ScatteredColumn &direction)
Fractional ComputeInfinityNormConditionNumber() const
double DeterministicTime() const
ABSL_MUST_USE_RESULT Status Initialize()
std::vector< ColIndex > ColIndexVector
virtual ~EtaFactorization()
void Update(ColIndex entering_col, RowIndex leaving_variable_row, const ScatteredColumn &direction)
void SparseLeftSolve(DenseRow *y, ColIndexVector *pos) const
Fractional ComputeInverseInfinityNorm() const
const ColumnPermutation & GetColumnPermutation() const
#define DCHECK(condition)
void SetParameters(const GlopParameters ¶meters)
ABSL_MUST_USE_RESULT Status Update(ColIndex entering_col, RowIndex leaving_variable_row, const ScatteredColumn &direction)
RowToColMapping ComputeInitialBasis(const std::vector< ColIndex > &candidates)
void RightSolve(DenseColumn *d) const
void LeftSolve(DenseRow *y) const
StrictITIVector< ColIndex, ColIndex > ColMapping
void RightSolve(DenseColumn *d) const
Collection of objects used to extend the Constraint Solver library.
void SetParameters(const GlopParameters ¶meters)
void RightSolveForProblemColumn(ColIndex col, ScatteredColumn *d) const
std::string StatString() const
Fractional ComputeInverseOneNorm() const
Fractional ComputeOneNorm() const
const DenseColumn & RightSolveForTau(const ScatteredColumn &a) const
ABSL_MUST_USE_RESULT Status Refactorize()
virtual ~BasisFactorization()