- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

# /home/coin/svn-release/Alps-1.4.6/CoinUtils/src/CoinPresolveZeros.hpp

Go to the documentation of this file.

    00001 /* $Id: CoinPresolveZeros.hpp 1498 2011-11-02 15:25:35Z mjs $ */
    00002 // Copyright (C) 2002, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004 // This code is licensed under the terms of the Eclipse Public License (EPL).
    00005
    00006 #ifndef CoinPresolveZeros_H
    00007 #define CoinPresolveZeros_H
    00008
    00014 #define DROP_ZERO       8
    00015
    00022 struct dropped_zero {
    00023   int row;
    00024   int col;
    00025 };
    00026
    00032 class drop_zero_coefficients_action : public CoinPresolveAction {
    00033
    00034   const int nzeros_;
    00035   const dropped_zero *const zeros_;
    00036
    00037   drop_zero_coefficients_action(int nzeros,
    00038                                 const dropped_zero *zeros,
    00039                                 const CoinPresolveAction *next) :
    00040     CoinPresolveAction(next),
    00041     nzeros_(nzeros), zeros_(zeros)
    00042 {}
    00043
    00044  public:
    00045   const char *name() const { return ("drop_zero_coefficients_action"); }
    00046
    00047   static const CoinPresolveAction *presolve(CoinPresolveMatrix *prob,
    00048                                          int *checkcols,
    00049                                          int ncheckcols,
    00050                                          const CoinPresolveAction *next);
    00051
    00052   void postsolve(CoinPostsolveMatrix *prob) const;
    00053
    00054   virtual ~drop_zero_coefficients_action() { deleteAction(zeros_,dropped_zero*); }
    00055 };
    00056
    00057 const CoinPresolveAction *drop_zero_coefficients(CoinPresolveMatrix *prob,
    00058                                               const CoinPresolveAction *next);
    00059
    00060 #endif