![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Help preprocessors deal with column deletion. More...
Help preprocessors deal with column deletion.
Definition at line 181 of file preprocessor.h.
#include <preprocessor.h>
Public Member Functions | |
ColumnDeletionHelper ()=default | |
ColumnDeletionHelper (const ColumnDeletionHelper &)=delete | |
ColumnDeletionHelper & | operator= (const ColumnDeletionHelper &)=delete |
void | MarkColumnForDeletion (ColIndex col) |
void | MarkColumnForDeletionWithState (ColIndex col, Fractional value, VariableStatus status) |
void | RestoreDeletedColumns (ProblemSolution *solution) const |
bool | IsColumnMarked (ColIndex col) const |
Returns whether or not the given column is marked for deletion. | |
const DenseBooleanRow & | GetMarkedColumns () const |
Returns a Boolean vector of the column to be deleted. | |
bool | IsEmpty () const |
Returns true if no columns have been marked for deletion. | |
void | Clear () |
Restores the class to its initial state. | |
const DenseRow & | GetStoredValue () const |
|
default |
|
delete |
void operations_research::glop::ColumnDeletionHelper::Clear | ( | ) |
Restores the class to its initial state.
Definition at line 241 of file preprocessor.cc.
|
inline |
Returns a Boolean vector of the column to be deleted.
Definition at line 209 of file preprocessor.h.
|
inline |
Returns the value that will be restored by RestoreDeletedColumnInSolution(). Note that only the marked position value make sense.
Definition at line 220 of file preprocessor.h.
|
inline |
Returns whether or not the given column is marked for deletion.
Definition at line 204 of file preprocessor.h.
|
inline |
Returns true if no columns have been marked for deletion.
Definition at line 212 of file preprocessor.h.
void operations_research::glop::ColumnDeletionHelper::MarkColumnForDeletion | ( | ColIndex | col | ) |
Remember the given column as "deleted" so that it can later be restored by RestoreDeletedColumns(). Optionally, the caller may indicate the value and status of the corresponding variable so that it is automatically restored; if they don't then the restored value and status will be junk and must be set by the caller.
The actual deletion is done by LinearProgram::DeleteColumns().
Definition at line 246 of file preprocessor.cc.
void operations_research::glop::ColumnDeletionHelper::MarkColumnForDeletionWithState | ( | ColIndex | col, |
Fractional | value, | ||
VariableStatus | status ) |
Definition at line 250 of file preprocessor.cc.
|
delete |
void operations_research::glop::ColumnDeletionHelper::RestoreDeletedColumns | ( | ProblemSolution * | solution | ) | const |
From a solution omitting the deleted column, expands it and inserts the deleted columns. If values and statuses for the corresponding variables were saved, they'll be restored.
Copy the end of the vectors and swap them with the ones in solution.
Definition at line 263 of file preprocessor.cc.