Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/home/coinadmin/Update/COIN/Clp/include/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;
00058   virtual CoinBigIndex fillBasis(ClpSimplex * model,
00059                                  const int * whichColumn, 
00060                                  int numberRowBasic,
00061                                  int & numberColumnBasic,
00062                                  int * row, int * column,
00063                                  double * element)  ;
00068   virtual CoinBigIndex * dubiousWeights(const ClpSimplex * model,int * inputWeights) const;
00072   virtual void rangeOfElements(double & smallestNegative, double & largestNegative,
00073                        double & smallestPositive, double & largestPositive);
00076   virtual void unpack(const ClpSimplex * model,CoinIndexedVector * rowArray,
00077                    int column) const ;
00082   virtual void unpackPacked(ClpSimplex * model,
00083                             CoinIndexedVector * rowArray,
00084                             int column) const;
00087   virtual void add(const ClpSimplex * model,CoinIndexedVector * rowArray,
00088                    int column, double multiplier) const ;
00090   virtual void add(const ClpSimplex * model,double * array,
00091                    int column, double multiplier) const;
00093    virtual void releasePackedMatrix() const ;
00095   virtual bool canDoPartialPricing() const;
00097   virtual void partialPricing(ClpSimplex * model, double start, double end,
00098                       int & bestSequence, int & numberWanted);
00100 
00106   virtual void times(double scalar,
00107                        const double * x, double * y) const;
00109   virtual void times(double scalar,
00110                      const double * x, double * y,
00111                      const double * rowScale, 
00112                      const double * columnScale) const;
00116     virtual void transposeTimes(double scalar,
00117                                 const double * x, double * y) const;
00119     virtual void transposeTimes(double scalar,
00120                                 const double * x, double * y,
00121                                 const double * rowScale, 
00122                                 const double * columnScale) const;
00127   virtual void transposeTimes(const ClpSimplex * model, double scalar,
00128                               const CoinIndexedVector * x,
00129                               CoinIndexedVector * y,
00130                               CoinIndexedVector * z) const;
00135   virtual void subsetTransposeTimes(const ClpSimplex * model,
00136                                     const CoinIndexedVector * x,
00137                                     const CoinIndexedVector * y,
00138                                     CoinIndexedVector * z) const;
00140 
00143 
00144   inline bool trueNetwork() const
00145   { return trueNetwork_;};
00147 
00148 
00152    ClpNetworkMatrix();
00154   ClpNetworkMatrix(int numberColumns, const int * head,
00155                    const int * tail);
00157    virtual ~ClpNetworkMatrix();
00159 
00163    ClpNetworkMatrix(const ClpNetworkMatrix&);
00165    ClpNetworkMatrix(const CoinPackedMatrix&);
00166 
00167    ClpNetworkMatrix& operator=(const ClpNetworkMatrix&);
00169   virtual ClpMatrixBase * clone() const ;
00171    
00172     
00173 protected:
00177 
00178   mutable double * elements_;
00179   mutable CoinBigIndex * starts_;
00180   mutable int * lengths_;
00182   int * indices_;
00184   int numberRows_;
00186   int numberColumns_;
00188   bool trueNetwork_;
00189   
00191 };
00192 
00193 #endif

Generated on Fri Aug 6 02:01:32 2004 by doxygen1.3-rc2