32#ifndef __SCIP_MULTIPRECISION_HPP_
33#define __SCIP_MULTIPRECISION_HPP_
40#include <boost/multiprecision/number.hpp>
43#include <boost/multiprecision/gmp.hpp>
44using namespace boost::multiprecision;
47 using Rational = boost::multiprecision::number<gmp_rational, et_off>;
51#include <boost/multiprecision/cpp_int.hpp>
52using namespace boost::multiprecision;
62 using sparsevec = std::vector<SCIP_RATIONAL>;
77 Rational(
const long long num,
const long long den){
val = 0.0;};
81 inline int sign()
const {
return 0; }
82 inline bool is_zero()
const {
return this->val == 0; }
83 inline std::string
str()
const {
return ""; }
friend bool operator<(const Rational &r, const Rational &d)
Rational(const Rational &r)
copy constructor
Rational & operator/(const double &r)
Rational & operator*=(const double &r)
friend bool operator==(const Rational &r, const double &d)
Rational & operator/(const Rational &r)
Rational & operator=(const Rational &r)
Rational & operator*(const double &r)
Rational & operator-(const double &r)
friend bool operator>(const Rational &r, const double &d)
Rational(const long long num, const long long den)
Rational & operator-=(const Rational &r)
Rational & operator=(const double &r)
friend bool operator>=(const Rational &r, const Rational &d)
Rational & operator+(const Rational &r)
friend bool operator<=(const Rational &r, const double &d)
Rational & operator+(const double &r)
friend bool operator>=(const Rational &r, const double &d)
Rational & operator*(const Rational &r)
Rational & operator=(const int &i)
Rational(const Rational &num, const Rational &den)
friend double operator/(const double d, const Rational &r)
Rational & operator-=(const double &r)
friend std::ostream & operator<<(std::ostream &os, const Rational &q)
friend bool operator<=(const Rational &r, const Rational &d)
friend bool operator==(const Rational &r, const Rational &d)
Rational & operator-(const Rational &r)
Rational & operator+=(const double &r)
Rational & operator+=(const Rational &r)
friend bool operator>(const Rational &r, const Rational &d)
friend bool operator<(const Rational &r, const double &d)
Rational(const std::string &s)
std::vector< SCIP_RATIONAL > sparsevec
INLINE SCIP_Longint numerator(Rational &r)
INLINE Rational & abs(Rational &r)
INLINE Rational & max(Rational &r1, Rational &r2)
INLINE Rational & min(Rational &r1, Rational &r2)
INLINE SCIP_Longint denominator(Rational &r)