CoinUtils 2.11.12
Loading...
Searching...
No Matches
drop_empty_cols_action Class Reference

Physically removes empty columns in presolve, and reinserts empty columns in postsolve. More...

#include <CoinPresolveEmpty.hpp>

Inheritance diagram for drop_empty_cols_action:
Collaboration diagram for drop_empty_cols_action:

Classes

struct  action

Public Member Functions

const char * name () const
 Construct a postsolve object and add it to the transformation list.
void postsolve (CoinPostsolveMatrix *prob) const
 Apply the postsolve transformation for this particular presolve action.
virtual ~drop_empty_cols_action ()
Public Member Functions inherited from CoinPresolveAction
virtual ~CoinPresolveAction ()
 Virtual destructor.

Static Public Member Functions

static const CoinPresolveActionpresolve (CoinPresolveMatrix *, const int *ecols, int necols, const CoinPresolveAction *)
static const CoinPresolveActionpresolve (CoinPresolveMatrix *prob, const CoinPresolveAction *next)
Static Public Member Functions inherited from CoinPresolveAction
static void throwCoinError (const char *error, const char *ps_routine)
 Stub routine to throw exceptions.

Private Member Functions

 drop_empty_cols_action (int nactions, const action *const actions, const CoinPresolveAction *next)

Private Attributes

const int nactions_
const action *const actions_

Additional Inherited Members

Public Attributes inherited from CoinPresolveAction
const CoinPresolveActionnext
 The next presolve transformation.

Detailed Description

Physically removes empty columns in presolve, and reinserts empty columns in postsolve.

Physical removal of rows and columns should be the last activities performed during presolve. Do them exactly once. The row-major matrix is not maintained by this transform.

To physically drop the columns, CoinPrePostsolveMatrix::mcstrt_ and CoinPrePostsolveMatrix::hincol_ are compressed, along with column bounds, objective, and (if present) the column portions of the solution. This renumbers the columns. drop_empty_cols_action::presolve will reconstruct CoinPresolveMatrix::clink_.

Todo
Confirm correct behaviour with solution in presolve.

Definition at line 34 of file CoinPresolveEmpty.hpp.

Constructor & Destructor Documentation

◆ drop_empty_cols_action()

drop_empty_cols_action::drop_empty_cols_action ( int nactions,
const action *const actions,
const CoinPresolveAction * next )
inlineprivate

Definition at line 47 of file CoinPresolveEmpty.hpp.

◆ ~drop_empty_cols_action()

virtual drop_empty_cols_action::~drop_empty_cols_action ( )
inlinevirtual

Definition at line 69 of file CoinPresolveEmpty.hpp.

Member Function Documentation

◆ name()

const char * drop_empty_cols_action::name ( ) const
inlinevirtual

Construct a postsolve object and add it to the transformation list.

This is an `add to head' operation. This object will point to the one passed as the parameter. */ CoinPresolveAction(const CoinPresolveAction *next) : next(next) { } modify next (when building rather than passing) inline void setNext(const CoinPresolveAction *nextAction) { next = nextAction; }

/*! A name for debug printing.

It is expected that the name is not stored in the transform itself.

Implements CoinPresolveAction.

Definition at line 57 of file CoinPresolveEmpty.hpp.

◆ presolve() [1/2]

const CoinPresolveAction * drop_empty_cols_action::presolve ( CoinPresolveMatrix * ,
const int * ecols,
int necols,
const CoinPresolveAction *  )
static

◆ presolve() [2/2]

const CoinPresolveAction * drop_empty_cols_action::presolve ( CoinPresolveMatrix * prob,
const CoinPresolveAction * next )
static

◆ postsolve()

void drop_empty_cols_action::postsolve ( CoinPostsolveMatrix * prob) const
virtual

Apply the postsolve transformation for this particular presolve action.

Implements CoinPresolveAction.

Member Data Documentation

◆ nactions_

const int drop_empty_cols_action::nactions_
private

Definition at line 36 of file CoinPresolveEmpty.hpp.

◆ actions_

const action* const drop_empty_cols_action::actions_
private

Definition at line 45 of file CoinPresolveEmpty.hpp.


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