• Main Page
  • Classes
  • Files
  • File List
  • File Members

/build/buildd/clp-1.11.1/Clp/src/ClpNetworkMatrix.hpp

Go to the documentation of this file.
00001 /* $Id: ClpNetworkMatrix.hpp 1458 2009-11-05 12:34:07Z forrest $ */
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 { return true; }
00027   virtual  CoinBigIndex getNumElements() const 
00028   { return 2*numberColumns_; }
00030    virtual int getNumCols() const { return numberColumns_; }
00032   virtual int getNumRows() const { return numberRows_; }
00033 
00038   virtual const double * getElements() const; 
00044   virtual const int * getIndices() const
00045   { return indices_;}
00046 
00047   virtual const CoinBigIndex * getVectorStarts() const;
00049   virtual const int * getVectorLengths() const;
00050 
00052   virtual void deleteCols(const int numDel, const int * indDel);
00054   virtual void deleteRows(const int numDel, const int * indDel);
00056   virtual void appendCols(int number, const CoinPackedVectorBase * const * columns);
00058   virtual void appendRows(int number, const CoinPackedVectorBase * const * rows);
00059 #ifndef SLIM_CLP
00060 
00064   virtual int appendMatrix(int number, int type,
00065                            const CoinBigIndex * starts, const int * index,
00066                            const double * element, int numberOther=-1);
00067 #endif
00068 
00069   virtual ClpMatrixBase * reverseOrderedCopy() const;
00071   virtual CoinBigIndex countBasis(
00072                                  const int * whichColumn, 
00073                                   int & numberColumnBasic);
00075   virtual void fillBasis(ClpSimplex * model,
00076                                  const int * whichColumn, 
00077                                  int & numberColumnBasic,
00078                                  int * row, int * start,
00079                                  int * rowCount, int * columnCount,
00080                                  CoinFactorizationDouble * element);
00085   virtual CoinBigIndex * dubiousWeights(const ClpSimplex * model,int * inputWeights) const;
00089   virtual void rangeOfElements(double & smallestNegative, double & largestNegative,
00090                        double & smallestPositive, double & largestPositive);
00093   virtual void unpack(const ClpSimplex * model,CoinIndexedVector * rowArray,
00094                    int column) const ;
00099   virtual void unpackPacked(ClpSimplex * model,
00100                             CoinIndexedVector * rowArray,
00101                             int column) const;
00104   virtual void add(const ClpSimplex * model,CoinIndexedVector * rowArray,
00105                    int column, double multiplier) const ;
00107   virtual void add(const ClpSimplex * model,double * array,
00108                    int column, double multiplier) const;
00110    virtual void releasePackedMatrix() const ;
00112   virtual bool canDoPartialPricing() const;
00114   virtual void partialPricing(ClpSimplex * model, double start, double end,
00115                       int & bestSequence, int & numberWanted);
00117 
00123   virtual void times(double scalar,
00124                        const double * x, double * y) const;
00126   virtual void times(double scalar,
00127                      const double * x, double * y,
00128                      const double * rowScale, 
00129                      const double * columnScale) const;
00133     virtual void transposeTimes(double scalar,
00134                                 const double * x, double * y) const;
00136     virtual void transposeTimes(double scalar,
00137                                 const double * x, double * y,
00138                                 const double * rowScale, 
00139                                 const double * columnScale, double * spare=NULL) const;
00144   virtual void transposeTimes(const ClpSimplex * model, double scalar,
00145                               const CoinIndexedVector * x,
00146                               CoinIndexedVector * y,
00147                               CoinIndexedVector * z) const;
00151   virtual void subsetTransposeTimes(const ClpSimplex * model,
00152                                     const CoinIndexedVector * x,
00153                                     const CoinIndexedVector * y,
00154                                     CoinIndexedVector * z) const;
00156 
00159 
00160   inline bool trueNetwork() const
00161   { return trueNetwork_;}
00163 
00164 
00168    ClpNetworkMatrix();
00170   ClpNetworkMatrix(int numberColumns, const int * head,
00171                    const int * tail);
00173    virtual ~ClpNetworkMatrix();
00175 
00179    ClpNetworkMatrix(const ClpNetworkMatrix&);
00181    ClpNetworkMatrix(const CoinPackedMatrix&);
00182 
00183    ClpNetworkMatrix& operator=(const ClpNetworkMatrix&);
00185   virtual ClpMatrixBase * clone() const ;
00188   ClpNetworkMatrix (const ClpNetworkMatrix & wholeModel,
00189                     int numberRows, const int * whichRows,
00190                     int numberColumns, const int * whichColumns);
00193   virtual ClpMatrixBase * subsetClone (
00194                     int numberRows, const int * whichRows,
00195                     int numberColumns, const int * whichColumns) const ;
00197    
00198     
00199 protected:
00203 
00204   mutable CoinPackedMatrix * matrix_;
00205   mutable int * lengths_;
00207   int * indices_;
00209   int numberRows_;
00211   int numberColumns_;
00213   bool trueNetwork_;
00214   
00216 };
00217 
00218 #endif

Generated on Fri Aug 20 2010 06:29:28 by  doxygen 1.7.1