SoPlex Documentation
Loading...
Searching...
No Matches
rational.h File Reference
#include <numeric>
#include <vector>
#include <string>
#include "soplex/spxdefines.h"
#include <gmp.h>

Go to the source code of this file.

Classes

class  Rational
 

Namespaces

namespace  soplex
 Everything should be within this namespace.
 

Typedefs

using Integer = int
 

Functions

Integer numerator (const Rational &r)
 
Integer denominator (const Rational &r)
 
Rational ratFromString (const char *desc)
 
int orderOfMagnitude (Rational &r)
 
void SpxLcm (Integer &result, Integer a, Integer b)
 
void SpxGcd (Integer &result, Integer a, Integer b)
 
void divide_qr (Integer &result, Integer &result2, Integer a, Integer b)
 
void invert (Rational &r)
 
void powRound (Rational &r)
 
int sizeInBase (const Rational R, const int base)
 Size in specified base (bit size for base 2)
 
int totalSizeRational (const Rational *vector, const int length, const int base)
 Total size of rational vector.
 
int dlcmSizeRational (const Rational *vector, const int length, const int base)
 Size of least common multiple of denominators in rational vector.
 
int dmaxSizeRational (const Rational *vector, const int length, const int base)
 Size of largest denominator in rational vector.
 

Typedef Documentation

◆ Integer

using Integer = int

Definition at line 233 of file rational.h.

Function Documentation

◆ denominator()

◆ divide_qr()

void divide_qr ( Integer & result,
Integer & result2,
Integer a,
Integer b )

Definition at line 961 of file rational.h.

◆ invert()

void invert ( Rational & r)

Definition at line 962 of file rational.h.

References Rational::rationalErrorMessage().

◆ numerator()

Integer numerator ( const Rational & r)

◆ orderOfMagnitude()

int orderOfMagnitude ( Rational & r)

Definition at line 954 of file rational.h.

References Rational::rationalErrorMessage().

◆ powRound()

void powRound ( Rational & r)

Definition at line 966 of file rational.h.

References Rational::rationalErrorMessage().

◆ ratFromString()

Rational ratFromString ( const char * desc)

Definition at line 950 of file rational.h.

◆ SpxGcd()

void SpxGcd ( Integer & result,
Integer a,
Integer b )

Definition at line 960 of file rational.h.

◆ SpxLcm()

void SpxLcm ( Integer & result,
Integer a,
Integer b )

Definition at line 959 of file rational.h.

Referenced by soplex::dlcmSizeRational().