Bonmin 1.8.9
Loading...
Searching...
No Matches
BonFilterWarmStart.hpp
Go to the documentation of this file.
1// (C) Copyright International Business Machines Corporation, 2006
2// All Rights Reserved.
3// This code is published under the Eclipse Public License.
4//
5// Authors :
6// Pierre Bonami, International Business Machines Corporation
7//
8// Date : 11/21/2006
9
10
11
12
13#ifndef BonFilterWarmStart_H
14#define BonFilterWarmStart_H
15
18#include "BonFilterTypes.hpp" /* for types */
19#include "CoinSmartPtr.hpp"
20
21#include <vector>
22
23namespace Bonmin
24{
25
34 public virtual CoinWarmStartPrimalDual, public virtual CoinWarmStartBasis,
36 {
37 typedef FilterTypes::fint fint;
38 typedef FilterTypes::real real;
39
40 public:
42 static fint def_istat[14];
44 FilterWarmStart(const fint xSize = 0,
45 const real* xArray = NULL,
46 const fint lamSize = 0,
47 const real* lamArray = NULL,
48 const fint lwsSize = 0,
49 const fint *lwsArray = NULL,
50 const fint istat[14] = def_istat);
51
54
56 virtual CoinWarmStart * clone() const
57 {
58 return new FilterWarmStart(*this);
59 }
60
63
65 virtual CoinWarmStartDiff* generateDiff(const CoinWarmStart * const other) const;
66
68 virtual void applyDiff(const CoinWarmStartDiff * const cswDiff);
69
71 const fint *lwsArray() const
72 {
73 return lwsArray_;
74 }
75
77 fint lwsSize() const
78 {
79 return lwsSize_;
80 }
81
82 const fint* istat()const
83 {
84 return istat_;
85 }
86
88 void flushPoint();
89
91 bool empty() const
92 {
93 return empty_;
94 }
95 private:
97 fint lwsSize_;
98
100 fint* lwsArray_;
101
103 fint istat_[14];
104
106 bool empty_;
107 };
108
110 {
111 typedef FilterTypes::fint fint;
112 typedef FilterTypes::real real;
113
114 friend class FilterWarmStart;
115
116 public:
118 fint capacity);
119
121
122 virtual CoinWarmStartDiff * clone() const
123 {
124 return new FilterWarmStartDiff(*this);
125 }
126
128 private:
130 typedef std::pair<fint, fint> OneDiff;
132 std::vector<OneDiff> differences;
134 fint istat_[14];
135 };
136
137} /* end namespace Bonmin */
138#endif
139
virtual CoinWarmStartDiff * clone() const
FilterWarmStartDiff(CoinWarmStartPrimalDualDiff *diff, fint capacity)
Warm start for filter interface.
void flushPoint()
flush the starting point
FilterWarmStart(const fint xSize=0, const real *xArray=NULL, const fint lamSize=0, const real *lamArray=NULL, const fint lwsSize=0, const fint *lwsArray=NULL, const fint istat[14]=def_istat)
Constructor.
fint lwsSize() const
Access to lws size.
const fint * lwsArray() const
Access to lws array.
FilterWarmStart(const FilterWarmStart &other)
Copy constructor.
virtual void applyDiff(const CoinWarmStartDiff *const cswDiff)
Apply differences.
virtual ~FilterWarmStart()
Destructor.
bool empty() const
Is this an empty warm start?
virtual CoinWarmStartDiff * generateDiff(const CoinWarmStart *const other) const
Generate differences.
static fint def_istat[14]
Default values for istat.
const fint * istat() const
virtual CoinWarmStart * clone() const
virtual copy
(C) Copyright International Business Machines Corporation 2007
double real
Fortran type for double.used in filter.
FORTRAN_INTEGER_TYPE fint
Fortran type for integer used in filter.