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

Detect and remove duplicate columns. More...

#include <CoinPresolveDupcol.hpp>

Inheritance diagram for dupcol_action:
Collaboration diagram for dupcol_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 ~dupcol_action ()
Public Member Functions inherited from CoinPresolveAction
virtual ~CoinPresolveAction ()
 Virtual destructor.

Static Public Member Functions

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

 dupcol_action ()
 dupcol_action (const dupcol_action &rhs)
dupcol_actionoperator= (const dupcol_action &rhs)
 dupcol_action (int nactions, const action *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

Detect and remove duplicate columns.

The general technique is to sum the coefficients a_(*,j) of each column. Columns with identical sums are duplicates. The obvious problem is that, e.g., [1 0 1 0] and [0 1 0 1] both add to 2. To minimize the chances of false positives, the coefficients of each row are multipled by a random number r_i, so that we sum r_i*a_ij.

Candidate columns are checked to confirm they are identical. Where the columns have the same objective coefficient, the two are combined. If the columns have different objective coefficients, complications ensue. In order to remove the duplicate, it must be possible to fix the variable at a bound.

Definition at line 32 of file CoinPresolveDupcol.hpp.

Constructor & Destructor Documentation

◆ dupcol_action() [1/3]

dupcol_action::dupcol_action ( )
private

◆ dupcol_action() [2/3]

dupcol_action::dupcol_action ( const dupcol_action & rhs)
private

◆ dupcol_action() [3/3]

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

Definition at line 53 of file CoinPresolveDupcol.hpp.

◆ ~dupcol_action()

virtual dupcol_action::~dupcol_action ( )
virtual

Member Function Documentation

◆ operator=()

dupcol_action & dupcol_action::operator= ( const dupcol_action & rhs)
private

◆ name()

const char * dupcol_action::name ( ) const
virtual

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.

◆ presolve()

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

◆ postsolve()

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

Apply the postsolve transformation for this particular presolve action.

Implements CoinPresolveAction.

Member Data Documentation

◆ nactions_

const int dupcol_action::nactions_
private

Definition at line 49 of file CoinPresolveDupcol.hpp.

◆ actions_

const action* const dupcol_action::actions_
private

Definition at line 51 of file CoinPresolveDupcol.hpp.


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