Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Help preprocessors deal with row deletion. More...
#include <preprocessor.h>
Public Member Functions | |
RowDeletionHelper ()=default | |
RowDeletionHelper (const RowDeletionHelper &)=delete | |
RowDeletionHelper & | operator= (const RowDeletionHelper &)=delete |
bool | IsEmpty () const |
Returns true if no rows have been marked for deletion. | |
void | Clear () |
Restores the class to its initial state. | |
void | MarkRowForDeletion (RowIndex row) |
Adds a deleted row to the helper. | |
void | UnmarkRow (RowIndex row) |
If the given row was marked for deletion, unmark it. | |
const DenseBooleanColumn & | GetMarkedRows () const |
Returns a Boolean vector of the row to be deleted. | |
bool | IsRowMarked (RowIndex row) const |
Returns whether or not the given row is marked for deletion. | |
void | RestoreDeletedRows (ProblemSolution *solution) const |
Help preprocessors deal with row deletion.
Definition at line 240 of file preprocessor.h.
|
default |
|
delete |
void operations_research::glop::RowDeletionHelper::Clear | ( | ) |
Restores the class to its initial state.
Definition at line 301 of file preprocessor.cc.
const DenseBooleanColumn & operations_research::glop::RowDeletionHelper::GetMarkedRows | ( | ) | const |
Returns a Boolean vector of the row to be deleted.
Definition at line 316 of file preprocessor.cc.
|
inline |
Returns true if no rows have been marked for deletion.
Definition at line 247 of file preprocessor.h.
|
inline |
Returns whether or not the given row is marked for deletion.
Definition at line 262 of file preprocessor.h.
void operations_research::glop::RowDeletionHelper::MarkRowForDeletion | ( | RowIndex | row | ) |
Adds a deleted row to the helper.
Definition at line 303 of file preprocessor.cc.
|
delete |
void operations_research::glop::RowDeletionHelper::RestoreDeletedRows | ( | ProblemSolution * | solution | ) | const |
From a solution without the deleted rows, expand it by restoring the deleted rows to a VariableStatus::BASIC status with 0.0 value. This latter value is important, many preprocessors rely on it.
Copy the end of the vectors and swap them with the ones in solution.
Definition at line 320 of file preprocessor.cc.
void operations_research::glop::RowDeletionHelper::UnmarkRow | ( | RowIndex | row | ) |
If the given row was marked for deletion, unmark it.
Definition at line 311 of file preprocessor.cc.