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

Help preprocessors deal with row deletion. More...

#include <preprocessor.h>

Public Member Functions

 RowDeletionHelper ()=default
 
 RowDeletionHelper (const RowDeletionHelper &)=delete
 
RowDeletionHelperoperator= (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 DenseBooleanColumnGetMarkedRows () 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
 

Detailed Description

Help preprocessors deal with row deletion.

RowDeletionHelper

Definition at line 240 of file preprocessor.h.

Constructor & Destructor Documentation

◆ RowDeletionHelper() [1/2]

operations_research::glop::RowDeletionHelper::RowDeletionHelper ( )
default

◆ RowDeletionHelper() [2/2]

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

Member Function Documentation

◆ Clear()

void operations_research::glop::RowDeletionHelper::Clear ( )

Restores the class to its initial state.

RowDeletionHelper

Definition at line 301 of file preprocessor.cc.

◆ GetMarkedRows()

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.

◆ IsEmpty()

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

Returns true if no rows have been marked for deletion.

Definition at line 247 of file preprocessor.h.

◆ IsRowMarked()

bool operations_research::glop::RowDeletionHelper::IsRowMarked ( RowIndex row) const
inline

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

Definition at line 262 of file preprocessor.h.

◆ MarkRowForDeletion()

void operations_research::glop::RowDeletionHelper::MarkRowForDeletion ( RowIndex row)

Adds a deleted row to the helper.

Definition at line 303 of file preprocessor.cc.

◆ operator=()

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

◆ RestoreDeletedRows()

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.

◆ UnmarkRow()

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.


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