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

Help preprocessors deal with column deletion. More...

#include <preprocessor.h>

Public Member Functions

 ColumnDeletionHelper ()=default
 
 ColumnDeletionHelper (const ColumnDeletionHelper &)=delete
 
ColumnDeletionHelperoperator= (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 DenseBooleanRowGetMarkedColumns () 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 DenseRowGetStoredValue () const
 

Detailed Description

Help preprocessors deal with column deletion.

Definition at line 182 of file preprocessor.h.

Constructor & Destructor Documentation

◆ ColumnDeletionHelper() [1/2]

operations_research::glop::ColumnDeletionHelper::ColumnDeletionHelper ( )
default

◆ ColumnDeletionHelper() [2/2]

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

Member Function Documentation

◆ Clear()

void operations_research::glop::ColumnDeletionHelper::Clear ( )

Restores the class to its initial state.

Definition at line 246 of file preprocessor.cc.

◆ GetMarkedColumns()

const DenseBooleanRow & operations_research::glop::ColumnDeletionHelper::GetMarkedColumns ( ) const
inline

Returns a Boolean vector of the column to be deleted.

Definition at line 210 of file preprocessor.h.

◆ GetStoredValue()

const DenseRow & operations_research::glop::ColumnDeletionHelper::GetStoredValue ( ) const
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.

◆ IsColumnMarked()

bool operations_research::glop::ColumnDeletionHelper::IsColumnMarked ( ColIndex col) const
inline

Returns whether or not the given column is marked for deletion.

Definition at line 205 of file preprocessor.h.

◆ IsEmpty()

bool operations_research::glop::ColumnDeletionHelper::IsEmpty ( ) const
inline

Returns true if no columns have been marked for deletion.

Definition at line 213 of file preprocessor.h.

◆ MarkColumnForDeletion()

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.

◆ MarkColumnForDeletionWithState()

void operations_research::glop::ColumnDeletionHelper::MarkColumnForDeletionWithState ( ColIndex col,
Fractional value,
VariableStatus status )

Definition at line 255 of file preprocessor.cc.

◆ operator=()

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

◆ RestoreDeletedColumns()

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.


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