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

- File List
- File Members

# /home/coin/SVN-release/Alps-1.2.1/Clp/src/ClpNetworkMatrix.hpp

Go to the documentation of this file.

    00001 /* $Id: ClpNetworkMatrix.hpp 1525 2010-02-26 17:27:59Z mjs $ */
    00002 // Copyright (C) 2003, International Business Machines
    00003 // Corporation and others.  All Rights Reserved.
    00004 #ifndef ClpNetworkMatrix_H
    00005 #define ClpNetworkMatrix_H
    00006
    00007
    00008 #include "CoinPragma.hpp"
    00009
    00010 #include "ClpMatrixBase.hpp"
    00011
    00017 class ClpNetworkMatrix : public ClpMatrixBase {
    00018
    00019 public:
    00022
    00023      virtual CoinPackedMatrix * getPackedMatrix() const;
    00025      virtual bool isColOrdered() const {
    00026           return true;
    00027      }
    00029      virtual  CoinBigIndex getNumElements() const {
    00030           return 2 * numberColumns_;
    00031      }
    00033      virtual int getNumCols() const {
    00034           return numberColumns_;
    00035      }
    00037      virtual int getNumRows() const {
    00038           return numberRows_;
    00039      }
    00040
    00045      virtual const double * getElements() const;
    00051      virtual const int * getIndices() const {
    00052           return indices_;
    00053      }
    00054
    00055      virtual const CoinBigIndex * getVectorStarts() const;
    00057      virtual const int * getVectorLengths() const;
    00058
    00060      virtual void deleteCols(const int numDel, const int * indDel);
    00062      virtual void deleteRows(const int numDel, const int * indDel);
    00064      virtual void appendCols(int number, const CoinPackedVectorBase * const * columns);
    00066      virtual void appendRows(int number, const CoinPackedVectorBase * const * rows);
    00067 #ifndef SLIM_CLP
    00068
    00072      virtual int appendMatrix(int number, int type,
    00073                               const CoinBigIndex * starts, const int * index,
    00074                               const double * element, int numberOther = -1);
    00075 #endif
    00076
    00077      virtual ClpMatrixBase * reverseOrderedCopy() const;
    00079      virtual CoinBigIndex countBasis(
    00080           const int * whichColumn,
    00081           int & numberColumnBasic);
    00083      virtual void fillBasis(ClpSimplex * model,
    00084                             const int * whichColumn,
    00085                             int & numberColumnBasic,
    00086                             int * row, int * start,
    00087                             int * rowCount, int * columnCount,
    00088                             CoinFactorizationDouble * element);
    00093      virtual CoinBigIndex * dubiousWeights(const ClpSimplex * model, int * inputWeights) const;
    00097      virtual void rangeOfElements(double & smallestNegative, double & largestNegative,
    00098                                   double & smallestPositive, double & largestPositive);
    00101      virtual void unpack(const ClpSimplex * model, CoinIndexedVector * rowArray,
    00102                          int column) const ;
    00107      virtual void unpackPacked(ClpSimplex * model,
    00108                                CoinIndexedVector * rowArray,
    00109                                int column) const;
    00112      virtual void add(const ClpSimplex * model, CoinIndexedVector * rowArray,
    00113                       int column, double multiplier) const ;
    00115      virtual void add(const ClpSimplex * model, double * array,
    00116                       int column, double multiplier) const;
    00118      virtual void releasePackedMatrix() const ;
    00120      virtual bool canDoPartialPricing() const;
    00122      virtual void partialPricing(ClpSimplex * model, double start, double end,
    00123                                  int & bestSequence, int & numberWanted);
    00125
    00131      virtual void times(double scalar,
    00132                         const double * x, double * y) const;
    00134      virtual void times(double scalar,
    00135                         const double * x, double * y,
    00136                         const double * rowScale,
    00137                         const double * columnScale) const;
    00141      virtual void transposeTimes(double scalar,
    00142                                  const double * x, double * y) const;
    00144      virtual void transposeTimes(double scalar,
    00145                                  const double * x, double * y,
    00146                                  const double * rowScale,
    00147                                  const double * columnScale, double * spare = NULL) const;
    00152      virtual void transposeTimes(const ClpSimplex * model, double scalar,
    00153                                  const CoinIndexedVector * x,
    00154                                  CoinIndexedVector * y,
    00155                                  CoinIndexedVector * z) const;
    00159      virtual void subsetTransposeTimes(const ClpSimplex * model,
    00160                                        const CoinIndexedVector * x,
    00161                                        const CoinIndexedVector * y,
    00162                                        CoinIndexedVector * z) const;
    00164
    00167
    00168      inline bool trueNetwork() const {
    00169           return trueNetwork_;
    00170      }
    00172
    00173
    00177      ClpNetworkMatrix();
    00179      ClpNetworkMatrix(int numberColumns, const int * head,
    00180                       const int * tail);
    00182      virtual ~ClpNetworkMatrix();
    00184
    00188      ClpNetworkMatrix(const ClpNetworkMatrix&);
    00190      ClpNetworkMatrix(const CoinPackedMatrix&);
    00191
    00192      ClpNetworkMatrix& operator=(const ClpNetworkMatrix&);
    00194      virtual ClpMatrixBase * clone() const ;
    00197      ClpNetworkMatrix (const ClpNetworkMatrix & wholeModel,
    00198                        int numberRows, const int * whichRows,
    00199                        int numberColumns, const int * whichColumns);
    00202      virtual ClpMatrixBase * subsetClone (
    00203           int numberRows, const int * whichRows,
    00204           int numberColumns, const int * whichColumns) const ;
    00206
    00207
    00208 protected:
    00212
    00213      mutable CoinPackedMatrix * matrix_;
    00214      mutable int * lengths_;
    00216      int * indices_;
    00218      int numberRows_;
    00220      int numberColumns_;
    00222      bool trueNetwork_;
    00223
    00225 };
    00226
    00227 #endif