30 #ifndef __LRSWrapper_WRAPPER__H__ 31 #define __LRSWrapper_WRAPPER__H__ 33 #include <agrum/agrum.h> 34 #include <agrum/tools/core/math/math_utils.h> 40 # include <agrum/tools/core/mvsc/unistd.h> 47 #include <unordered_set> 50 #include <agrum/tools/core/math/rational.h> 59 #include <agrum/tools/external/lrslib/lrslib.h> 64 # define FORMAT "%4.4lu" 65 # define MAXD 2147483647L
72 # define MAXD 9223372036854775807L
73 # define BASE 1000000000L
74 # define FORMAT "%9.9lu" 82 typedef __int64 int64_t;
83 typedef unsigned __int64 uint64_t;
90 #define enumStringify(name) #name 105 template <
typename GUM_SCALAR >
109 using matrix =
typename std::vector< std::vector< GUM_SCALAR > >;
124 std::unordered_set<
int > _insertedModals_;
127 unsigned int _vertices_;
132 std::vector< std::vector< GUM_SCALAR > > _insertedVertices_;
136 std::vector< GUM_SCALAR > _vertex_;
143 enum class _states_ :
char 160 const char* _setUpStateNames_[5] = {
176 mutable int _oldCout_;
190 lrs_mp_vector _lrsOutput_;
212 void _coutOff_()
const;
215 void _coutOn_()
const;
248 void _getLRSWrapperOutput_(lrs_mp Nin,
250 std::vector< int64_t >& Num,
251 std::vector< int64_t >& Den)
const;
278 const matrix& getInput()
const;
284 const matrix& getOutput()
const;
290 const unsigned int& getVerticesNumber()
const;
308 const GUM_SCALAR& getVolume()
const;
323 void setUpH(
const Size& card);
335 void setUpV(
const Size& card,
const Size& vertices);
375 void fillH(
const GUM_SCALAR& min,
const GUM_SCALAR& max,
const Size& modal);
384 void fillMatrix(
const std::vector< std::vector< GUM_SCALAR > >& matrix);
394 void fillV(
const std::vector< GUM_SCALAR >& vertex);
434 void computeVolume();
442 void elimRedundVrep();
454 #include <agrum/CN/polytope/LrsWrapper_tpl.h> #define enumStringify(name)