16 Rational(
int v,
bool rounded =
false);
17 Rational(
double d,
bool rounded =
false);
21 Rational(
const Eigen::VectorX<char>& data);
22 Rational(
const std::string& data,
bool rounded =
false);
61 explicit operator double()
const;
Rational(bool rounded=false)
friend bool operator<=(const Rational &r, const Rational &r1)
friend std::ostream & operator<<(std::ostream &os, const Rational &r)
friend bool operator!=(const Rational &r, const Rational &r1)
friend Rational pow(const Rational &x, int p)
std::string numerator() const
Rational & operator=(const Rational &x)
friend Rational operator*(const Rational &x, const Rational &y)
friend bool operator>(const Rational &r, const Rational &r1)
friend bool operator<(const Rational &r, const Rational &r1)
friend Rational operator+(const Rational &x, const Rational &y)
std::string serialize() const
friend Rational operator-(const Rational &x, const Rational &y)
friend bool operator==(const Rational &r, const Rational &r1)
void init_from_binary(const std::string &v)
friend bool operator>=(const Rational &r, const Rational &r1)
std::string denominator() const
friend Rational abs(const Rational &r0)
friend int cmp(const Rational &r, const Rational &r1)
std::string to_binary() const
friend Rational operator/(const Rational &x, const Rational &y)