Scippy

SoPlex

Sequential object-oriented simPlex

rational.h File Reference
#include <numeric>
#include <vector>
#include <string>
#include "soplex/spxdefines.h"
#include <gmp.h>
#include <boost/multiprecision/number.hpp>
#include <boost/multiprecision/gmp.hpp>

Go to the source code of this file.

Namespaces

 soplex
 Everything should be within this namespace.
 

Typedefs

using Rational = number< gmp_rational, et_off >
 
using Integer = number< gmp_int, et_off >
 

Functions

void SpxLcm (Integer &result, Integer a, Integer b)
 
void SpxGcd (Integer &result, Integer a, Integer b)
 
void printRational (Rational r)
 
void printInteger (Integer r)
 
bool isAdjacentTo (const Rational &r, const double &d)
 
void invert (Rational &r)
 
void powRound (Rational &r)
 round up to next power of two More...
 
int orderOfMagnitude (Rational &r)
 returns the order of magnitude of the given rational More...
 
static std::string::const_iterator findSubStringIC (const std::string &substr, const std::string &str)
 
Rational ratFromString (const char *desc)
 
int sizeInBase (const Rational R, const int base)
 Size in specified base (bit size for base 2) More...
 
int totalSizeRational (const Rational *vector, const int length, const int base)
 Total size of rational vector. More...
 
int dlcmSizeRational (const Rational *vector, const int length, const int base)
 Size of least common multiple of denominators in rational vector. More...
 
int dmaxSizeRational (const Rational *vector, const int length, const int base)
 Size of largest denominator in rational vector. More...