20#ifndef MCRL2_UTILITIES_PROBABILISTIC_ARBITRARY_PRECISION_FRACTION_H
21#define MCRL2_UTILITIES_PROBABILISTIC_ARBITRARY_PRECISION_FRACTION_H
159 return other.operator<(*this);
166 return other.operator<=(*this);
255 if (x.
is_zero()) { x=y;
return; }
262 y.
div_mod(x,buffer_divide,buffer_remainder,buffer);
263 while (!buffer_remainder.
is_zero())
268 y.
div_mod(x,buffer_divide,buffer_remainder,buffer);
324struct hash<
mcrl2::utilities::probabilistic_arbitrary_precision_fraction >
328 hash<mcrl2::utilities::big_natural_number> hasher;
This file contains a class big_natural_number that stores big positive numbers of arbitrary size....
void div_mod(const big_natural_number &other, big_natural_number &result, big_natural_number &remainder, big_natural_number &calculation_buffer_divisor) const
void add(const big_natural_number &other)
void clear()
Sets the number to zero.
bool is_zero() const
Returns whether this number equals zero.
void multiply(const big_natural_number &other, big_natural_number &result, big_natural_number &calculation_buffer_for_multiplicand) const
void subtract(const big_natural_number &other)
This class contains labels for probabilistic transistions, consisting of a numerator and a denominato...
probabilistic_arbitrary_precision_fraction operator*(const probabilistic_arbitrary_precision_fraction &other) const
probabilistic_arbitrary_precision_fraction()
static void greatest_common_divisor_destructive(utilities::big_natural_number &x, utilities::big_natural_number &y, utilities::big_natural_number &buffer_divide, utilities::big_natural_number &buffer_remainder, utilities::big_natural_number &buffer)
static utilities::big_natural_number & buffer2()
bool operator>=(const probabilistic_arbitrary_precision_fraction &other) const
static void remove_common_factors(utilities::big_natural_number &enumerator, utilities::big_natural_number &denominator)
bool operator!=(const probabilistic_arbitrary_precision_fraction &other) const
const utilities::big_natural_number & denominator() const
probabilistic_arbitrary_precision_fraction operator+(const probabilistic_arbitrary_precision_fraction &other) const
bool operator<(const probabilistic_arbitrary_precision_fraction &other) const
bool operator>(const probabilistic_arbitrary_precision_fraction &other) const
static probabilistic_arbitrary_precision_fraction & one()
Constant one.
static utilities::big_natural_number greatest_common_divisor(utilities::big_natural_number x, utilities::big_natural_number y)
static utilities::big_natural_number & buffer3()
static utilities::big_natural_number & buffer1()
probabilistic_arbitrary_precision_fraction operator-(const probabilistic_arbitrary_precision_fraction &other) const
utilities::big_natural_number m_denominator
const utilities::big_natural_number & enumerator() const
static probabilistic_arbitrary_precision_fraction & zero()
Constant zero.
probabilistic_arbitrary_precision_fraction operator/(const probabilistic_arbitrary_precision_fraction &other) const
bool operator<=(const probabilistic_arbitrary_precision_fraction &other) const
probabilistic_arbitrary_precision_fraction(const std::string &enumerator, const std::string &denominator)
probabilistic_arbitrary_precision_fraction(const utilities::big_natural_number &enumerator, const utilities::big_natural_number &denominator)
utilities::big_natural_number m_enumerator
bool operator==(const probabilistic_arbitrary_precision_fraction &other) const
std::size_t hash_combine(const std::size_t h1, const std::size_t h2)
void swap(big_natural_number &x, big_natural_number &y)
Standard overload of swap.
std::string pp(const big_natural_number &l)
std::ostream & operator<<(std::ostream &ss, const big_natural_number &l)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
std::size_t operator()(const mcrl2::utilities::probabilistic_arbitrary_precision_fraction &p) const