14#ifndef OR_TOOLS_GLOP_LU_FACTORIZATION_H_
15#define OR_TOOLS_GLOP_LU_FACTORIZATION_H_
21#include "ortools/glop/parameters.pb.h"
62 ABSL_MUST_USE_RESULT
Status
70 const std::vector<ColIndex>& candidates);
81 inverse_col_perm_.
clear();
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_;
Statistic on the distribution of a sequence of integers.
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
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
Returns the deterministic time of the last factorization.
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)
Sets the current parameters.
Fractional DualEdgeSquaredNorm(RowIndex row) const
Returns the norm of (B^T)^{-1}.e_row where e is an unit vector.
Fractional ComputeInverseInfinityNormUpperBound() const
ABSL_MUST_USE_RESULT Status ComputeFactorization(const CompactSparseMatrixView &compact_matrix)
std::string StatString() const
Returns a string containing the statistics for this class.
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
Returns the norm of B^{-1}.a.
LuFactorization(const LuFactorization &)=delete
This type is neither copyable nor movable.
RowToColMapping ComputeInitialBasis(const CompactSparseMatrix &matrix, const std::vector< ColIndex > &candidates)
Fractional ComputeOneNormConditionNumber(const CompactSparseMatrixView &matrix) const
bool IsIdentityFactorization()
const RowPermutation & row_perm() const
Visible for testing.
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
Returns the column permutation used by the LU factorization.
std::string StatString() const
Returns a string containing the statistics for this class.
void SetParameters(const GlopParameters ¶meters)
Sets the current parameters.
void PopulateFromProduct(const SparseMatrix &a, const SparseMatrix &b)
Multiplies SparseMatrix a by SparseMatrix b.
void CopyToSparseMatrix(SparseMatrix *output) const
Copy a triangular matrix to the given SparseMatrix.
Permutation< ColIndex > ColumnPermutation
Permutation< RowIndex > RowPermutation
StrictITIVector< RowIndex, Fractional > DenseColumn
Column-vector types. Column-vector types are indexed by a row index.
In SWIG mode, we don't want anything besides these top-level includes.
util_intops::StrongVector< ColumnEntryIndex, ElementIndex, ElementAllocator > SparseColumn