BonBoundsReader.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef BoundsReader_HPP
00011 #define BoundsReader_HPP
00012
00013 #include <string>
00014 #include "BonOsiTMINLPInterface.hpp"
00015
00016
00017 namespace Bonmin {
00020 class BoundsReader
00021 {
00022 public:
00023
00024 BoundsReader():
00025 fileName_(),
00026 lowerBounds_(NULL),
00027 upperBounds_(NULL),
00028 nLower_(0),
00029 nUpper_(0)
00030 {}
00031
00032
00033 BoundsReader(const std::string &fileName):
00034 fileName_(fileName),
00035 lowerBounds_(NULL),
00036 upperBounds_(NULL),
00037 indexLowers_(NULL),
00038 indexUppers_(NULL),
00039 nLower_(0),
00040 nUpper_(0)
00041 {}
00042
00043
00044 void setFileName(const std::string &fileName)
00045 {
00046 fileName_ = fileName;
00047 }
00048
00049
00050 ~BoundsReader();
00051
00052
00053 void gutsOfDestructor();
00054
00055
00056
00057 void read(const std::string &);
00058
00059
00060 void read();
00061
00062
00063 void readAndApply(OsiTMINLPInterface * solver);
00064 private:
00065
00067 std::string fileName_;
00069 double * lowerBounds_;
00071 double * upperBounds_;
00073 int * indexLowers_;
00075 int * indexUppers_;
00077 int nLower_;
00079 int nUpper_;
00080 };
00081 }
00082 #endif