Bonmin  1.7
BonBqpdWarmStart.hpp
Go to the documentation of this file.
00001 // (C) Copyright International Business Machines Corporation 2007
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // Authors :
00006 // Andreas Waechter, International Business Machines Corporation
00007 //                    based on BonFilterWarmStart.hpp
00008 //
00009 // Date : 2007-08-03
00010 
00011 
00012 #ifndef BonBqpdWarmStart_H
00013 #define BonBqpdWarmStart_H
00014 
00015 #include "CoinWarmStartBasis.hpp"
00016 #include "CoinWarmStartPrimalDual.hpp"
00017 #include "BonFilterSolver.hpp" /* for types */
00018 
00019 #include <vector>
00020 
00021 namespace Bonmin{
00022 
00030   class BqpdWarmStart :
00031     public virtual CoinWarmStartPrimalDual, public virtual CoinWarmStartBasis,
00032     public Coin::ReferencedObject
00033   {
00034     typedef FilterSolver::fint fint;
00035     typedef FilterSolver::real real;
00036     
00037   public:
00039     static fint def_istat[14];
00041     BqpdWarmStart(const fint xSize = 0,
00042                     const real* xArray = NULL,
00043                     const fint lamSize = 0,
00044                     const real* lamArray = NULL,
00045                     const fint lwsSize = 0,
00046                     const fint *lwsArray = NULL,
00047                     const fint istat[14] = def_istat);
00048 
00050     BqpdWarmStart(const BqpdWarmStart & other);
00051 
00053     BqpdWarmStart(const CoinWarmStartPrimalDual& pdws);
00054 
00056     virtual CoinWarmStart * clone() const
00057     { return new BqpdWarmStart(*this);}
00058 
00060     virtual ~BqpdWarmStart();
00061 
00063     virtual CoinWarmStartDiff* generateDiff(const CoinWarmStart * const other) const;
00064 
00066     virtual void applyDiff(const CoinWarmStartDiff * const cswDiff);
00067 
00069     const fint *lwsArray() const{
00070       return lwsArray_;
00071     }
00072 
00074     fint lwsSize() const {
00075       return lwsSize_;}
00076 
00077     const fint* istat()const {
00078       return istat_;}
00079 
00080     void flushPoint();
00081 
00083     bool empty() const
00084     {
00085       return empty_;
00086     }
00087   private:
00089     fint lwsSize_;
00090 
00092     fint* lwsArray_;
00093 
00095     fint istat_[14];
00097     bool empty_;
00098   };
00099 
00100 } /* end namespace Bonmin */
00101 #endif
00102