1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
////////////////////////////////////////////////////////////////////////////////
//
// SPXinterface.hh
//
// produced: 2003/01/05 jr
// last change: 2003/01/05 jr
//
////////////////////////////////////////////////////////////////////////////////
#ifndef SPXINTERFACE_HH
#define SPXINTERFACE_HH
#ifdef HAVE_LIBSOPLEX
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include "Vector.hh"
#include "Matrix.hh"
// Soplex includes (make only sense if soplex has been installed with GMP and BOOST):
#include "soplex.h"
namespace topcom {
inline soplex::Rational __field_to_soplexrational(const Field& q) {
return soplex::Rational(*(mpq_t*)q.get_mpq_t());
}
inline Field __soplexrational_to_field(const soplex::Rational& q) {
return Field(q.backend().data());
}
};
namespace topcom {
class SPXinterface {
private:
soplex::SoPlexBase<soplex::Real> _soplex_obj;
const LabelSet _support;
private:
inline SPXinterface() {}
public:
// constructors:
SPXinterface(const Matrix&, const LabelSet&);
// destructor:
inline ~SPXinterface();
// soplex need not be initialized and terminated,
// so this is for consistency only:
inline static void init() {}
inline static void term() {}
// functions:
bool has_interior_point(Vector* heightsptr);
};
inline SPXinterface::~SPXinterface() {}
}; // namespace topcom
#endif // HAVE_LIBSOPLEX
#endif
// eof SPX interface.hh
|