Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
Help preprocessors deal with column deletion. More...
#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 |
Help preprocessors deal with column deletion.
Definition at line 182 of file preprocessor.h.
|
default |
|
delete |
void operations_research::glop::ColumnDeletionHelper::Clear | ( | ) |
Restores the class to its initial state.
Definition at line 246 of file preprocessor.cc.
|
inline |
Returns a Boolean vector of the column to be deleted.
Definition at line 210 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 221 of file preprocessor.h.
|
inline |
Returns whether or not the given column is marked for deletion.
Definition at line 205 of file preprocessor.h.
|
inline |
Returns true if no columns have been marked for deletion.
Definition at line 213 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 251 of file preprocessor.cc.
void operations_research::glop::ColumnDeletionHelper::MarkColumnForDeletionWithState | ( | ColIndex | col, |
Fractional | value, | ||
VariableStatus | status ) |
Definition at line 255 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 268 of file preprocessor.cc.