14 #ifndef OR_TOOLS_GLOP_RANK_ONE_UPDATE_H_
15 #define OR_TOOLS_GLOP_RANK_ONE_UPDATE_H_
47 ColIndex u_index, ColIndex v_index,
71 if (multiplier != 0.0) {
90 if (multiplier != 0.0) {
125 const CompactSparseMatrix* storage_;
144 elementary_matrices_.clear();
150 elementary_matrices_.push_back(update_matrix);
157 for (
int i = elementary_matrices_.size() - 1; i >= 0; --i) {
158 elementary_matrices_[i].LeftSolve(y);
175 for (
int i = elementary_matrices_.size() - 1; i >= 0; --i) {
177 elementary_matrices_[i].LeftSolve(&y->
values);
179 elementary_matrices_[i].LeftSolveWithNonZeros(y);
190 const size_t end = elementary_matrices_.size();
191 for (
int i = 0; i < end; ++i) {
192 elementary_matrices_[i].RightSolve(d);
209 const size_t end = elementary_matrices_.size();
210 for (
int i = 0; i < end; ++i) {
212 elementary_matrices_[i].RightSolve(&d->
values);
214 elementary_matrices_[i].RightSolveWithNonZeros(d);
225 double hypersparse_ratio_;
226 EntryIndex num_entries_;
227 std::vector<RankOneUpdateElementaryMatrix> elementary_matrices_;
#define DCHECK(condition)
EntryIndex num_entries() const
void ColumnCopyToDenseColumn(ColIndex col, DenseColumn *dense_column) const
void ColumnAddMultipleToSparseScatteredColumn(ColIndex col, Fractional multiplier, ScatteredColumn *column) const
Fractional ColumnScalarProduct(ColIndex col, const DenseRow &vector) const
void ColumnAddMultipleToDenseColumn(ColIndex col, Fractional multiplier, DenseColumn *dense_column) const
ColumnView column(ColIndex col) const
void RightMultiply(DenseColumn *x) const
RankOneUpdateElementaryMatrix(const CompactSparseMatrix *storage, ColIndex u_index, ColIndex v_index, Fractional u_dot_v)
void LeftSolve(DenseRow *y) const
void LeftSolveWithNonZeros(ScatteredRow *y) const
void RightSolve(DenseColumn *x) const
void LeftMultiply(DenseRow *y) const
void RightSolveWithNonZeros(ScatteredColumn *x) const
EntryIndex num_entries() const
void RightSolveWithNonZeros(ScatteredColumn *d) const
void RightSolve(DenseColumn *d) const
void LeftSolve(DenseRow *y) const
void LeftSolveWithNonZeros(ScatteredRow *y) const
void Update(const RankOneUpdateElementaryMatrix &update_matrix)
EntryIndex num_entries() const
RankOneUpdateFactorization()
void set_hypersparse_ratio(double value)
bool IsAllFalse(const BoolVector &v)
const DenseRow & Transpose(const DenseColumn &col)
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...
#define RETURN_IF_NULL(x)
void RepopulateSparseMask()
bool ShouldUseDenseIteration(double ratio_for_using_dense_representation) const
void ClearNonZerosIfTooDense(double ratio_for_using_dense_representation)
std::vector< Index > non_zeros
StrictITIVector< Index, bool > is_non_zero
StrictITIVector< Index, Fractional > values