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

- File List
- File Members

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

Go to the documentation of this file.

    00001 // Copyright (C) 2003, International Business Machines
    00002 // Corporation and others.  All Rights Reserved.
    00003 #ifndef ClpNetworkMatrix_H
    00004 #define ClpNetworkMatrix_H
    00005
    00006
    00007 #include "CoinPragma.hpp"
    00008
    00009 #include "ClpMatrixBase.hpp"
    00010
    00016 class ClpNetworkMatrix : public ClpMatrixBase {
    00017
    00018 public:
    00021
    00022    virtual CoinPackedMatrix * getPackedMatrix() const;
    00024    virtual bool isColOrdered() const { return true; }
    00026   virtual  CoinBigIndex getNumElements() const
    00027   { return 2*numberColumns_; }
    00029    virtual int getNumCols() const { return numberColumns_; }
    00031   virtual int getNumRows() const { return numberRows_; }
    00032
    00037   virtual const double * getElements() const;
    00043   virtual const int * getIndices() const
    00044   { return indices_;}
    00045
    00046   virtual const CoinBigIndex * getVectorStarts() const;
    00048   virtual const int * getVectorLengths() const;
    00049
    00051   virtual void deleteCols(const int numDel, const int * indDel);
    00053   virtual void deleteRows(const int numDel, const int * indDel);
    00055   virtual ClpMatrixBase * reverseOrderedCopy() const;
    00057   virtual CoinBigIndex countBasis(ClpSimplex * model,
    00058                                  const int * whichColumn,
    00059                                  int numberRowBasic,
    00060                                   int & numberColumnBasic);
    00062   virtual void fillBasis(ClpSimplex * model,
    00063                                  const int * whichColumn,
    00064                                  int & numberColumnBasic,
    00065                                  int * row, int * start,
    00066                                  int * rowCount, int * columnCount,
    00067                                  double * element);
    00072   virtual CoinBigIndex * dubiousWeights(const ClpSimplex * model,int * inputWeights) const;
    00076   virtual void rangeOfElements(double & smallestNegative, double & largestNegative,
    00077                        double & smallestPositive, double & largestPositive);
    00080   virtual void unpack(const ClpSimplex * model,CoinIndexedVector * rowArray,
    00081                    int column) const ;
    00086   virtual void unpackPacked(ClpSimplex * model,
    00087                             CoinIndexedVector * rowArray,
    00088                             int column) const;
    00091   virtual void add(const ClpSimplex * model,CoinIndexedVector * rowArray,
    00092                    int column, double multiplier) const ;
    00094   virtual void add(const ClpSimplex * model,double * array,
    00095                    int column, double multiplier) const;
    00097    virtual void releasePackedMatrix() const ;
    00099   virtual bool canDoPartialPricing() const;
    00101   virtual void partialPricing(ClpSimplex * model, double start, double end,
    00102                       int & bestSequence, int & numberWanted);
    00104
    00110   virtual void times(double scalar,
    00111                        const double * x, double * y) const;
    00113   virtual void times(double scalar,
    00114                      const double * x, double * y,
    00115                      const double * rowScale,
    00116                      const double * columnScale) const;
    00120     virtual void transposeTimes(double scalar,
    00121                                 const double * x, double * y) const;
    00123     virtual void transposeTimes(double scalar,
    00124                                 const double * x, double * y,
    00125                                 const double * rowScale,
    00126                                 const double * columnScale, double * spare=NULL) const;
    00131   virtual void transposeTimes(const ClpSimplex * model, double scalar,
    00132                               const CoinIndexedVector * x,
    00133                               CoinIndexedVector * y,
    00134                               CoinIndexedVector * z) const;
    00138   virtual void subsetTransposeTimes(const ClpSimplex * model,
    00139                                     const CoinIndexedVector * x,
    00140                                     const CoinIndexedVector * y,
    00141                                     CoinIndexedVector * z) const;
    00143
    00146
    00147   inline bool trueNetwork() const
    00148   { return trueNetwork_;}
    00150
    00151
    00155    ClpNetworkMatrix();
    00157   ClpNetworkMatrix(int numberColumns, const int * head,
    00158                    const int * tail);
    00160    virtual ~ClpNetworkMatrix();
    00162
    00166    ClpNetworkMatrix(const ClpNetworkMatrix&);
    00168    ClpNetworkMatrix(const CoinPackedMatrix&);
    00169
    00170    ClpNetworkMatrix& operator=(const ClpNetworkMatrix&);
    00172   virtual ClpMatrixBase * clone() const ;
    00174
    00175
    00176 protected:
    00180
    00181   mutable double * elements_;
    00182   mutable CoinBigIndex * starts_;
    00183   mutable int * lengths_;
    00185   int * indices_;
    00187   int numberRows_;
    00189   int numberColumns_;
    00191   bool trueNetwork_;
    00192
    00194 };
    00195
    00196 #endif