Scippy

SoPlex

Sequential object-oriented simPlex

Wrapper for GMP type mpq_class.We wrap mpq_class so that we can replace it by a double type if GMP is not available. More...

#include <rational.h>

Classes

class  Private
 Defines the "Pimpl"-class Private. More...
 

Public Member Functions

 operator double () const
 typecasts Rational to double (only allows explicit typecasting)
 
 operator long double () const
 typecasts Rational to long double (only allows explicit typecasting)
 
Rational operator+ (const Rational &r) const
 addition operator
 
Rationaloperator+= (const Rational &r)
 addition assignment operator
 
Rational operator+ (const double &r) const
 addition operator for doubles
 
Rationaloperator+= (const double &r)
 addition assignment operator for doubles
 
Rational operator+ (const int &r) const
 addition operator for ints
 
Rationaloperator+= (const int &r)
 addition assignment operator for ints
 
Rational operator- (const Rational &r) const
 subtraction operator
 
Rationaloperator-= (const Rational &r)
 subtraction assignment operator
 
Rational operator- (const double &r) const
 subtraction operator for doubles
 
Rationaloperator-= (const double &r)
 subtraction assignment operator for doubles
 
Rational operator- (const int &r) const
 subtraction operator for ints
 
Rationaloperator-= (const int &r)
 subtraction assignment operator for ints
 
Rational operator* (const Rational &r) const
 multiplication operator
 
Rationaloperator*= (const Rational &r)
 multiplication assignment operator operator
 
Rational operator* (const double &r) const
 multiplication operator for doubles
 
Rationaloperator*= (const double &r)
 multiplication assignment operator for doubles
 
Rational operator* (const int &r) const
 multiplication operator for ints
 
Rationaloperator*= (const int &r)
 multiplication assignment operator for ints
 
Rational operator/ (const Rational &r) const
 division operator
 
Rationaloperator/= (const Rational &r)
 division assignment operator
 
Rational operator/ (const double &r) const
 division operator for doubles
 
Rationaloperator/= (const double &r)
 division assignment operator for doubles
 
Rational operator/ (const int &r) const
 division operator for ints
 
Rationaloperator/= (const int &r)
 division assignment operator for ints
 
RationaladdProduct (const Rational &r, const Rational &s)
 add product of two rationals
 
RationalsubProduct (const Rational &r, const Rational &s)
 subtract product of two rationals
 
RationaladdQuotient (const Rational &r, const Rational &s)
 add quotient of two rationals, r divided by s
 
RationalsubQuotient (const Rational &r, const Rational &s)
 subtract quotient of two rationals, r divided by s
 
Rationalinvert ()
 inversion
 
RationalpowRound ()
 round up to next power of two
 
bool isNextTo (const double &d)
 checks if d is the closest number that can be represented by double
 
bool isAdjacentTo (const double &d) const
 checks if d is exactly equal to the Rational and if not, if it is one of the two adjacent doubles
 
int sizeInBase (const int base=2) const
 Size in specified base (bit size for base 2)
 

Static Public Member Functions

static int precision ()
 returns precision of Rational implementation, i.e., number of bits used to store Rational numbers (INT_MAX if exact)
 

Static Public Attributes

static const Rational ZERO
 rational zero
 
static const Rational POSONE
 rational plus one
 
static const Rational NEGONE
 rational minus one
 

Private Member Functions

 Rational (const int &i, const bool &dummy)
 special constructor only for initializing static rational variables; this is necessary since we need a constructor for Rational::{ZERO, POSONE, NEGONE} that does not use these numbers
 

Private Attributes

Privatedpointer
 

Static Private Attributes

static IdList< PrivateunusedPrivateList
 
static bool useListMem
 

Friends

int compareRational (const Rational &r, const Rational &s)
 comparison operator returning a positive value if r > s, zero if r = s, and a negative value if r < s
 
bool operator!= (const Rational &r, const Rational &s)
 inequality operator
 
bool operator== (const Rational &r, const Rational &s)
 equality operator
 
bool operator< (const Rational &r, const Rational &s)
 less than operator
 
bool operator<= (const Rational &r, const Rational &s)
 less than or equal to operator
 
bool operator> (const Rational &r, const Rational &s)
 greater than operator
 
bool operator>= (const Rational &r, const Rational &s)
 greater than or equal to operator
 
bool operator!= (const Rational &r, const double &s)
 inequality operator for Rational and double
 
bool operator== (const Rational &r, const double &s)
 equality operator for Rational and double
 
bool operator< (const Rational &r, const double &s)
 less than operator for Rational and double
 
bool operator<= (const Rational &r, const double &s)
 less than or equal to operator for Rational and double
 
bool operator> (const Rational &r, const double &s)
 greater than operator for Rational and double
 
bool operator>= (const Rational &r, const double &s)
 greater than or equal to operator for Rational and double
 
bool operator!= (const double &r, const Rational &s)
 inequality operator double and Rational
 
bool operator== (const double &r, const Rational &s)
 equality operator for double and Rational
 
bool operator< (const double &r, const Rational &s)
 less than operator double and Rational
 
bool operator<= (const double &r, const Rational &s)
 less than or equal to operator double and Rational
 
bool operator> (const double &r, const Rational &s)
 greater than operator double and Rational
 
bool operator>= (const double &r, const Rational &s)
 greater than or equal to operator double and Rational
 
bool operator!= (const Rational &r, const long double &s)
 inequality operator for Rational and long double
 
bool operator== (const Rational &r, const long double &s)
 equality operator for Rational and long double
 
bool operator< (const Rational &r, const long double &s)
 less than operator for Rational and long double
 
bool operator<= (const Rational &r, const long double &s)
 less than or equal to operator for Rational and long double
 
bool operator> (const Rational &r, const long double &s)
 greater than operator for Rational and long double
 
bool operator>= (const Rational &r, const long double &s)
 greater than or equal to operator for Rational and long double
 
bool operator!= (const long double &r, const Rational &s)
 inequality operator long double and Rational
 
bool operator== (const long double &r, const Rational &s)
 equality operator for long double and Rational
 
bool operator< (const long double &r, const Rational &s)
 less than operator long double and Rational
 
bool operator<= (const long double &r, const Rational &s)
 less than or equal to operator long double and Rational
 
bool operator> (const long double &r, const Rational &s)
 greater than operator long double and Rational
 
bool operator>= (const long double &r, const Rational &s)
 greater than or equal to operator long double and Rational
 
Rational operator+ (const double &d, const Rational &r)
 addition operator for double and Rational
 
Rational operator- (const double &d, const Rational &r)
 subtraction operator for double and Rational
 
Rational operator* (const double &d, const Rational &r)
 multiplication operator for double and Rational
 
Rational operator/ (const double &d, const Rational &r)
 division operator for double and Rational
 
bool operator!= (const Rational &r, const int &s)
 inequality operator for Rational and int
 
bool operator== (const Rational &r, const int &s)
 equality operator for Rational and int
 
bool operator< (const Rational &r, const int &s)
 less than operator for Rational and int
 
bool operator<= (const Rational &r, const int &s)
 less than or equal to operator for Rational and int
 
bool operator> (const Rational &r, const int &s)
 greater than operator for Rational and int
 
bool operator>= (const Rational &r, const int &s)
 greater than or equal to operator for Rational and int
 
bool operator!= (const int &r, const Rational &s)
 inequality operator for int and Rational
 
bool operator== (const int &r, const Rational &s)
 equality operator for int and Rational
 
bool operator< (const int &r, const Rational &s)
 less than operator for int and Rational
 
bool operator<= (const int &r, const Rational &s)
 less than or equal to operator for int and Rational
 
bool operator> (const int &r, const Rational &s)
 greater than operator for int and Rational
 
bool operator>= (const int &r, const Rational &s)
 greater than or equal to operator for int and Rational
 
Rational operator+ (const int &d, const Rational &r)
 addition operator for int and Rational
 
Rational operator- (const int &d, const Rational &r)
 subtraction operator for int and Rational
 
Rational operator* (const int &d, const Rational &r)
 multiplication operator for int and Rational
 
Rational operator/ (const int &d, const Rational &r)
 division operator for int and Rational
 
Rational spxAbs (const Rational &r)
 Absolute.
 
int sign (const Rational &r)
 Sign function; returns 1 if r > 0, 0 if r = 0, and -1 if r < 0.
 
Rational operator- (const Rational &q)
 Negation.
 
 Rational ()
 default constructor
 
 Rational (const Rational &r)
 copy constructor
 
 Rational (const long double &r)
 constructor from long double
 
 Rational (const double &r)
 constructor from double
 
 Rational (const int &i)
 constructor from int
 
 ~Rational ()
 destructor
 
Rationaloperator= (const Rational &)
 assignment operator
 
Rationaloperator= (const long double &r)
 assignment operator from long double
 
Rationaloperator= (const double &r)
 assignment operator from double
 
Rationaloperator= (const int &i)
 assignment operator from int
 
static void enableListMem ()
 enables list memory
 
static void freeListMem ()
 frees the unused rational elements in the memory list
 
static void disableListMem ()
 disables list memory
 
bool readString (const char *s)
 read Rational from string
 
std::string rationalToString (const Rational &r, const int precision)
 convert rational number to string
 
bool readStringRational (const char *s, Rational &value)
 read Rational from string
 
std::ostream & operator<< (std::ostream &os, const Rational &q)
 print Rational
 

Detailed Description

Wrapper for GMP type mpq_class.

We wrap mpq_class so that we can replace it by a double type if GMP is not available.

If compiled with GMP support, Rational is defined as mpq_class.

Definition at line 45 of file rational.h.

Constructor & Destructor Documentation

Rational ( const int &  i,
const bool &  dummy 
)
private

special constructor only for initializing static rational variables; this is necessary since we need a constructor for Rational::{ZERO, POSONE, NEGONE} that does not use these numbers

Definition at line 2994 of file rational.cpp.

References Rational::dpointer, and soplex::spx_alloc().

Rational ( )

default constructor

Definition at line 3005 of file rational.cpp.

References Rational::dpointer, and soplex::spx_alloc().

Rational ( const Rational r)

copy constructor

Definition at line 3015 of file rational.cpp.

References Rational::dpointer, and soplex::spx_alloc().

Rational ( const long double &  r)

constructor from long double

Definition at line 3025 of file rational.cpp.

References Rational::dpointer, and soplex::spx_alloc().

Rational ( const double &  r)

constructor from double

Definition at line 3035 of file rational.cpp.

References Rational::dpointer, and soplex::spx_alloc().

Rational ( const int &  i)

constructor from int

Definition at line 3045 of file rational.cpp.

References Rational::dpointer, and soplex::spx_alloc().

~Rational ( )

destructor

Definition at line 3055 of file rational.cpp.

References Rational::dpointer, and soplex::spx_free().

Member Function Documentation

Rational & addProduct ( const Rational r,
const Rational s 
)

add product of two rationals

Definition at line 3372 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Referenced by SoPlex::_computeInfeasBox().

Rational & addQuotient ( const Rational r,
const Rational s 
)

add quotient of two rationals, r divided by s

Definition at line 3390 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

void disableListMem ( )
static

disables list memory

Definition at line 3083 of file rational.cpp.

Referenced by main().

void enableListMem ( )
static

enables list memory

Definition at line 3063 of file rational.cpp.

void freeListMem ( )
static

frees the unused rational elements in the memory list

this can be useful when you want to save memory or needed when working with a GMP memory manager like the one in EGlib that frees GMP memory before the destructor of the static memory list is called; in most cases this method is optional; note that this does not free the Rational elements that are currently in use

Definition at line 3075 of file rational.cpp.

Rational & invert ( )

inversion

Definition at line 3408 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Referenced by SoPlex::_performOptIRStable().

bool isAdjacentTo ( const double &  d) const

checks if d is exactly equal to the Rational and if not, if it is one of the two adjacent doubles

checks if d is exactly equal to the Rational and if not, if it is one of the two adjacent doubles

Definition at line 3434 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

bool isNextTo ( const double &  d)

checks if d is the closest number that can be represented by double

checks if d is the closest possible double

Definition at line 3426 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

operator double ( ) const
explicit

typecasts Rational to double (only allows explicit typecasting)

typecasts Rational to double (allows only explicit typecast)

Definition at line 3127 of file rational.cpp.

References Rational::Private::privatevalue.

operator long double ( ) const
explicit

typecasts Rational to long double (only allows explicit typecasting)

typecasts Rational to long double (allows only explicit typecast)

Definition at line 3135 of file rational.cpp.

Rational operator* ( const Rational r) const

multiplication operator

Definition at line 3258 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator* ( const double &  r) const

multiplication operator for doubles

Definition at line 3277 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator* ( const int &  r) const

multiplication operator for ints

Definition at line 3296 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator*= ( const Rational r)

multiplication assignment operator operator

multiplication assignment operator

Definition at line 3268 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator*= ( const double &  r)

multiplication assignment operator for doubles

Definition at line 3287 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator*= ( const int &  r)

multiplication assignment operator for ints

Definition at line 3306 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator+ ( const Rational r) const

addition operator

Definition at line 3144 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator+ ( const double &  r) const

addition operator for doubles

Definition at line 3163 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator+ ( const int &  r) const

addition operator for ints

Definition at line 3182 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator+= ( const Rational r)

addition assignment operator

Definition at line 3154 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator+= ( const double &  r)

addition assignment operator for doubles

Definition at line 3173 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator+= ( const int &  r)

addition assignment operator for ints

Definition at line 3192 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator- ( const Rational r) const

subtraction operator

Definition at line 3201 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator- ( const double &  r) const

subtraction operator for doubles

Definition at line 3220 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator- ( const int &  r) const

subtraction operator for ints

Definition at line 3239 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator-= ( const Rational r)

subtraction assignment operator

Definition at line 3211 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator-= ( const double &  r)

subtraction assignment operator for doubles

Definition at line 3230 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator-= ( const int &  r)

subtraction assignment operator for ints

Definition at line 3249 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator/ ( const Rational r) const

division operator

Definition at line 3315 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator/ ( const double &  r) const

division operator for doubles

Definition at line 3334 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational operator/ ( const int &  r) const

division operator for ints

Definition at line 3353 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator/= ( const Rational r)

division assignment operator

Definition at line 3325 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator/= ( const double &  r)

division assignment operator for doubles

Definition at line 3344 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator/= ( const int &  r)

division assignment operator for ints

Definition at line 3363 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Rational & operator= ( const Rational r)

assignment operator

Definition at line 3091 of file rational.cpp.

References Rational::dpointer.

Rational & operator= ( const long double &  r)

assignment operator from long double

Definition at line 3100 of file rational.cpp.

References Rational::dpointer.

Rational & operator= ( const double &  r)

assignment operator from double

Definition at line 3109 of file rational.cpp.

References Rational::dpointer.

Rational & operator= ( const int &  i)

assignment operator from int

Definition at line 3118 of file rational.cpp.

References Rational::dpointer.

Rational & powRound ( )

round up to next power of two

Todo:
implement

Definition at line 3417 of file rational.cpp.

Referenced by SoPlex::_performOptIRStable().

int precision ( )
static

returns precision of Rational implementation, i.e., number of bits used to store Rational numbers (INT_MAX if exact)

Definition at line 3451 of file rational.cpp.

Referenced by Rational::sizeInBase().

bool readString ( const char *  s)
int sizeInBase ( const int  base = 2) const

Size in specified base (bit size for base 2)

Todo:
this is only correct for base 2

Definition at line 3442 of file rational.cpp.

References Rational::precision().

Rational & subProduct ( const Rational r,
const Rational s 
)

subtract product of two rationals

Definition at line 3381 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Referenced by SoPlex::_computeInfeasBox().

Rational & subQuotient ( const Rational r,
const Rational s 
)

subtract quotient of two rationals, r divided by s

Definition at line 3399 of file rational.cpp.

References Rational::dpointer, and Rational::Private::privatevalue.

Friends And Related Function Documentation

int compareRational ( const Rational r,
const Rational s 
)
friend

comparison operator returning a positive value if r > s, zero if r = s, and a negative value if r < s

Definition at line 3495 of file rational.cpp.

bool operator!= ( const Rational r,
const Rational s 
)
friend

inequality operator

Definition at line 3516 of file rational.cpp.

bool operator!= ( const Rational r,
const double &  s 
)
friend

inequality operator for Rational and double

Definition at line 3565 of file rational.cpp.

bool operator!= ( const double &  r,
const Rational s 
)
friend

inequality operator double and Rational

inequality operator for double and Rational

Definition at line 3615 of file rational.cpp.

bool operator!= ( const Rational r,
const long double &  s 
)
friend

inequality operator for Rational and long double

Definition at line 3666 of file rational.cpp.

bool operator!= ( const long double &  r,
const Rational s 
)
friend

inequality operator long double and Rational

inequality operator for long double and Rational

Definition at line 3716 of file rational.cpp.

bool operator!= ( const Rational r,
const int &  s 
)
friend

inequality operator for Rational and int

Definition at line 3765 of file rational.cpp.

bool operator!= ( const int &  r,
const Rational s 
)
friend

inequality operator for int and Rational

Definition at line 3813 of file rational.cpp.

Rational operator* ( const double &  d,
const Rational r 
)
friend

multiplication operator for double and Rational

Definition at line 3873 of file rational.cpp.

Rational operator* ( const int &  d,
const Rational r 
)
friend

multiplication operator for int and Rational

Definition at line 3909 of file rational.cpp.

Rational operator+ ( const double &  d,
const Rational r 
)
friend

addition operator for double and Rational

Definition at line 3853 of file rational.cpp.

Rational operator+ ( const int &  d,
const Rational r 
)
friend

addition operator for int and Rational

Definition at line 3893 of file rational.cpp.

Rational operator- ( const double &  d,
const Rational r 
)
friend

subtraction operator for double and Rational

Definition at line 3863 of file rational.cpp.

Rational operator- ( const int &  d,
const Rational r 
)
friend

subtraction operator for int and Rational

Definition at line 3901 of file rational.cpp.

Rational operator- ( const Rational q)
friend

Negation.

Definition at line 3946 of file rational.cpp.

Rational operator/ ( const double &  d,
const Rational r 
)
friend

division operator for double and Rational

Definition at line 3883 of file rational.cpp.

Rational operator/ ( const int &  d,
const Rational r 
)
friend

division operator for int and Rational

Definition at line 3917 of file rational.cpp.

bool operator< ( const Rational r,
const Rational s 
)
friend

less than operator

Definition at line 3524 of file rational.cpp.

bool operator< ( const Rational r,
const double &  s 
)
friend

less than operator for Rational and double

Definition at line 3574 of file rational.cpp.

bool operator< ( const double &  r,
const Rational s 
)
friend

less than operator double and Rational

less than operator for double and Rational

Definition at line 3624 of file rational.cpp.

bool operator< ( const Rational r,
const long double &  s 
)
friend

less than operator for Rational and long double

Definition at line 3675 of file rational.cpp.

bool operator< ( const long double &  r,
const Rational s 
)
friend

less than operator long double and Rational

less than operator for long double and Rational

Definition at line 3725 of file rational.cpp.

bool operator< ( const Rational r,
const int &  s 
)
friend

less than operator for Rational and int

Definition at line 3773 of file rational.cpp.

bool operator< ( const int &  r,
const Rational s 
)
friend

less than operator for int and Rational

Definition at line 3821 of file rational.cpp.

std::ostream& operator<< ( std::ostream &  os,
const Rational q 
)
friend

print Rational

Definition at line 3486 of file rational.cpp.

bool operator<= ( const Rational r,
const Rational s 
)
friend

less than or equal to operator

Definition at line 3532 of file rational.cpp.

bool operator<= ( const Rational r,
const double &  s 
)
friend

less than or equal to operator for Rational and double

Definition at line 3582 of file rational.cpp.

bool operator<= ( const double &  r,
const Rational s 
)
friend

less than or equal to operator double and Rational

less than or equal to operator for double and Rational

Definition at line 3632 of file rational.cpp.

bool operator<= ( const Rational r,
const long double &  s 
)
friend

less than or equal to operator for Rational and long double

Definition at line 3683 of file rational.cpp.

bool operator<= ( const long double &  r,
const Rational s 
)
friend

less than or equal to operator long double and Rational

less than or equal to operator for long double and Rational

Definition at line 3733 of file rational.cpp.

bool operator<= ( const Rational r,
const int &  s 
)
friend

less than or equal to operator for Rational and int

Definition at line 3781 of file rational.cpp.

bool operator<= ( const int &  r,
const Rational s 
)
friend

less than or equal to operator for int and Rational

Definition at line 3829 of file rational.cpp.

bool operator== ( const Rational r,
const Rational s 
)
friend

equality operator

Definition at line 3508 of file rational.cpp.

bool operator== ( const Rational r,
const double &  s 
)
friend

equality operator for Rational and double

Definition at line 3556 of file rational.cpp.

bool operator== ( const double &  r,
const Rational s 
)
friend

equality operator for double and Rational

Definition at line 3606 of file rational.cpp.

bool operator== ( const Rational r,
const long double &  s 
)
friend

equality operator for Rational and long double

Definition at line 3657 of file rational.cpp.

bool operator== ( const long double &  r,
const Rational s 
)
friend

equality operator for long double and Rational

Definition at line 3707 of file rational.cpp.

bool operator== ( const Rational r,
const int &  s 
)
friend

equality operator for Rational and int

Definition at line 3757 of file rational.cpp.

bool operator== ( const int &  r,
const Rational s 
)
friend

equality operator for int and Rational

Definition at line 3805 of file rational.cpp.

bool operator> ( const Rational r,
const Rational s 
)
friend

greater than operator

Definition at line 3540 of file rational.cpp.

bool operator> ( const Rational r,
const double &  s 
)
friend

greater than operator for Rational and double

Definition at line 3590 of file rational.cpp.

bool operator> ( const double &  r,
const Rational s 
)
friend

greater than operator double and Rational

greater than operator for double and Rational

Definition at line 3640 of file rational.cpp.

bool operator> ( const Rational r,
const long double &  s 
)
friend

greater than operator for Rational and long double

Definition at line 3691 of file rational.cpp.

bool operator> ( const long double &  r,
const Rational s 
)
friend

greater than operator long double and Rational

greater than operator for long double and Rational

Definition at line 3741 of file rational.cpp.

bool operator> ( const Rational r,
const int &  s 
)
friend

greater than operator for Rational and int

Definition at line 3789 of file rational.cpp.

bool operator> ( const int &  r,
const Rational s 
)
friend

greater than operator for int and Rational

Definition at line 3837 of file rational.cpp.

bool operator>= ( const Rational r,
const Rational s 
)
friend

greater than or equal to operator

Definition at line 3548 of file rational.cpp.

bool operator>= ( const Rational r,
const double &  s 
)
friend

greater than or equal to operator for Rational and double

Definition at line 3598 of file rational.cpp.

bool operator>= ( const double &  r,
const Rational s 
)
friend

greater than or equal to operator double and Rational

greater than or equal to operator for double and Rational

Definition at line 3648 of file rational.cpp.

bool operator>= ( const Rational r,
const long double &  s 
)
friend

greater than or equal to operator for Rational and long double

Definition at line 3699 of file rational.cpp.

bool operator>= ( const long double &  r,
const Rational s 
)
friend

greater than or equal to operator long double and Rational

greater than or equal to operator for long double and Rational

Definition at line 3749 of file rational.cpp.

bool operator>= ( const Rational r,
const int &  s 
)
friend

greater than or equal to operator for Rational and int

Definition at line 3797 of file rational.cpp.

bool operator>= ( const int &  r,
const Rational s 
)
friend

greater than or equal to operator for int and Rational

Definition at line 3845 of file rational.cpp.

std::string rationalToString ( const Rational r,
const int  precision 
)
friend

convert rational number to string

Definition at line 3468 of file rational.cpp.

bool readStringRational ( const char *  s,
Rational value 
)
friend

read Rational from string

Definition at line 3478 of file rational.cpp.

int sign ( const Rational r)
friend

Sign function; returns 1 if r > 0, 0 if r = 0, and -1 if r < 0.

Definition at line 3938 of file rational.cpp.

Rational spxAbs ( const Rational r)
friend

Absolute.

absolute function

Definition at line 3925 of file rational.cpp.

Member Data Documentation

const Rational NEGONE
static

rational minus one

Definition at line 65 of file rational.h.

Referenced by SoPlex::_transformFeasibility().

IdList< Private > unusedPrivateList
staticprivate

Definition at line 51 of file rational.h.

bool useListMem
staticprivate

Definition at line 52 of file rational.h.

const Rational ZERO
static

rational zero

Definition at line 63 of file rational.h.

Referenced by SoPlex::_transformEquality(), and SoPlex::objValueRational().