Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::glop::RankOneUpdateFactorization Class Reference

#include <rank_one_update.h>

Public Member Functions

 RankOneUpdateFactorization ()
 
 RankOneUpdateFactorization (const RankOneUpdateFactorization &)=delete
 This type is neither copyable nor movable.
 
RankOneUpdateFactorizationoperator= (const RankOneUpdateFactorization &)=delete
 
void set_hypersparse_ratio (double value)
 This is currently only visible for testing.
 
void Clear ()
 Deletes all elementary matrices of this factorization.
 
void Update (const RankOneUpdateElementaryMatrix &update_matrix)
 Updates the factorization.
 
void LeftSolve (DenseRow *y) const
 Left-solves all systems from right to left, i.e. y_i = y_{i+1}.(T_i)^{-1}.
 
void LeftSolveWithNonZeros (ScatteredRow *y) const
 
void RightSolve (DenseColumn *d) const
 Right-solves all systems from left to right, i.e. T_i.d_{i+1} = d_i.
 
void RightSolveWithNonZeros (ScatteredColumn *d) const
 
EntryIndex num_entries () const
 
double DeterministicTimeSinceLastReset () const
 
void ResetDeterministicTime ()
 

Detailed Description

A rank one update factorization corresponds to the product of k rank one update elementary matrices, i.e. T = T_0.T_1. ... .T_{k-1}

Definition at line 135 of file rank_one_update.h.

Constructor & Destructor Documentation

◆ RankOneUpdateFactorization() [1/2]

operations_research::glop::RankOneUpdateFactorization::RankOneUpdateFactorization ( )
inline
Todo
(user): make the 5% a parameter and share it between all the places that switch between a sparse/dense version.

Definition at line 139 of file rank_one_update.h.

◆ RankOneUpdateFactorization() [2/2]

operations_research::glop::RankOneUpdateFactorization::RankOneUpdateFactorization ( const RankOneUpdateFactorization & )
delete

This type is neither copyable nor movable.

Member Function Documentation

◆ Clear()

void operations_research::glop::RankOneUpdateFactorization::Clear ( )
inline

Deletes all elementary matrices of this factorization.

Definition at line 150 of file rank_one_update.h.

◆ DeterministicTimeSinceLastReset()

double operations_research::glop::RankOneUpdateFactorization::DeterministicTimeSinceLastReset ( ) const
inline

Deterministic time spent in all the solves function since last reset.

Todo
(user): This is quite precise. However we overcount a bit, because in each elementary solves, if the scalar product involved is zero, we skip some of the operations counted here. Is it worth spending a bit more time to be more precise here?

Definition at line 241 of file rank_one_update.h.

◆ LeftSolve()

void operations_research::glop::RankOneUpdateFactorization::LeftSolve ( DenseRow * y) const
inline

Left-solves all systems from right to left, i.e. y_i = y_{i+1}.(T_i)^{-1}.

Definition at line 162 of file rank_one_update.h.

◆ LeftSolveWithNonZeros()

void operations_research::glop::RankOneUpdateFactorization::LeftSolveWithNonZeros ( ScatteredRow * y) const
inline

Same as LeftSolve(), but if the given non_zeros are not empty, then all the new non-zeros in the result are appended to it.

y->is_non_zero is always all false before and after this code.

Definition at line 172 of file rank_one_update.h.

◆ num_entries()

EntryIndex operations_research::glop::RankOneUpdateFactorization::num_entries ( ) const
inline

Definition at line 233 of file rank_one_update.h.

◆ operator=()

RankOneUpdateFactorization & operations_research::glop::RankOneUpdateFactorization::operator= ( const RankOneUpdateFactorization & )
delete

◆ ResetDeterministicTime()

void operations_research::glop::RankOneUpdateFactorization::ResetDeterministicTime ( )
inline

Definition at line 242 of file rank_one_update.h.

◆ RightSolve()

void operations_research::glop::RankOneUpdateFactorization::RightSolve ( DenseColumn * d) const
inline

Right-solves all systems from left to right, i.e. T_i.d_{i+1} = d_i.

Definition at line 197 of file rank_one_update.h.

◆ RightSolveWithNonZeros()

void operations_research::glop::RankOneUpdateFactorization::RightSolveWithNonZeros ( ScatteredColumn * d) const
inline

Same as RightSolve(), but if the given non_zeros are not empty, then all the new non-zeros in the result are appended to it.

d->is_non_zero is always all false before and after this code.

Definition at line 208 of file rank_one_update.h.

◆ set_hypersparse_ratio()

void operations_research::glop::RankOneUpdateFactorization::set_hypersparse_ratio ( double value)
inline

This is currently only visible for testing.

Definition at line 147 of file rank_one_update.h.

◆ Update()

void operations_research::glop::RankOneUpdateFactorization::Update ( const RankOneUpdateElementaryMatrix & update_matrix)
inline

Updates the factorization.

Definition at line 156 of file rank_one_update.h.


The documentation for this class was generated from the following file: