14#ifndef ORTOOLS_GLOP_LU_FACTORIZATION_H_
15#define ORTOOLS_GLOP_LU_FACTORIZATION_H_
62 ABSL_MUST_USE_RESULT
Status
70 const std::vector<ColIndex>& candidates);
81 inverse_col_perm_.clear();
204 parameters_ = parameters;
205 markowitz_.SetParameters(parameters);
210 return stats_.StatString() + markowitz_.StatString();
218 lower_.CopyToSparseMatrix(&temp_lower);
219 upper_.CopyToSparseMatrix(&temp_upper);
229 return inverse_col_perm_;
237 basis_num_entries(
"basis_num_entries", this),
238 lu_fill_in(
"lu_fill_in", this) {}
244 void LeftSolveScratchpad()
const;
247 template <
typename Column>
248 void RightSolveLInternal(
const Column& b, ScatteredColumn* x)
const;
251 void ComputeTransposeUpper();
254 void ComputeTransposeLower()
const;
258 bool CheckFactorization(
const CompactSparseMatrixView& matrix,
266 bool is_identity_factorization_;
269 TriangularMatrix lower_;
270 TriangularMatrix upper_;
271 TriangularMatrix transpose_upper_;
275 mutable TriangularMatrix transpose_lower_;
295 mutable std::vector<RowIndex> non_zero_rows_;
298 mutable Stats stats_;
301 GlopParameters parameters_;
304 Markowitz markowitz_;
void RightSolveLForColumnView(const ColumnView &b, ScatteredColumn *x) const
void RightSolve(DenseColumn *x) const
const ColumnPermutation & inverse_col_perm() const
void RightSolveUWithNonZeros(ScatteredColumn *x) const
ColIndex LeftSolveUForUnitRow(ColIndex col, ScatteredRow *y) const
double DeterministicTimeOfLastFactorization() const
void LeftSolve(DenseRow *y) const
void RightSolveLForScatteredColumn(const ScatteredColumn &b, ScatteredColumn *x) const
void RightSolveLWithPermutedInput(const DenseColumn &a, ScatteredColumn *x) const
void SetParameters(const GlopParameters ¶meters)
Fractional DualEdgeSquaredNorm(RowIndex row) const
Fractional ComputeInverseInfinityNormUpperBound() const
ABSL_MUST_USE_RESULT Status ComputeFactorization(const CompactSparseMatrixView &compact_matrix)
std::string StatString() const
Fractional ComputeInverseOneNorm() const
EntryIndex NumberOfEntries() const
void RightSolveLWithNonZeros(ScatteredColumn *x) const
Fractional ComputeInverseInfinityNorm() const
bool LeftSolveLWithNonZeros(ScatteredRow *y, ScatteredColumn *result_before_permutation) const
Fractional ComputeInfinityNormConditionNumber(const CompactSparseMatrixView &matrix) const
Fractional RightSolveSquaredNorm(const ColumnView &a) const
LuFactorization(const LuFactorization &)=delete
RowToColMapping ComputeInitialBasis(const CompactSparseMatrix &matrix, const std::vector< ColIndex > &candidates)
Fractional ComputeOneNormConditionNumber(const CompactSparseMatrixView &matrix) const
bool IsIdentityFactorization()
const RowPermutation & row_perm() const
double GetFillInPercentage(const CompactSparseMatrixView &matrix) const
void ComputeLowerTimesUpper(SparseMatrix *product) const
const SparseColumn & GetColumnOfU(ColIndex col) const
void LeftSolveUWithNonZeros(ScatteredRow *y) const
LuFactorization & operator=(const LuFactorization &)=delete
void SetColumnPermutationToIdentity()
Fractional ComputeDeterminant() const
const ColumnPermutation & GetColumnPermutation() const
void PopulateFromProduct(const SparseMatrix &a, const SparseMatrix &b)
StrictITIVector< RowIndex, ColIndex > RowToColMapping
Permutation< ColIndex > ColumnPermutation
Permutation< RowIndex > RowPermutation
StrictITIVector< RowIndex, Fractional > DenseColumn
StrictITIVector< ColIndex, Fractional > DenseRow