CVCL::Rational Class Reference

#include <rational.h>

Collaboration diagram for CVCL::Rational:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Private Member Functions

Private Attributes

Friends

Classes


Detailed Description

Definition at line 49 of file rational.h.


Constructor & Destructor Documentation

CVCL::Rational::Rational const Impl t  )  [private]
 

Private constructor.

Definition at line 327 of file rational-gmp.cpp.

References getCreated(), and printStats().

CVCL::Rational::Rational  ) 
 

Default constructor.

Definition at line 310 of file rational-gmp.cpp.

References getCreated(), and printStats().

Referenced by getDenominator(), getNumerator(), and operator-().

CVCL::Rational::Rational const Rational n  ) 
 

Copy constructor.

Definition at line 318 of file rational-gmp.cpp.

References getCreated(), and printStats().

CVCL::Rational::Rational int  n,
int  d = 1
 

Definition at line 334 of file rational-gmp.cpp.

References getCreated(), and printStats().

CVCL::Rational::Rational const char *  n,
int  base = 10
 

Definition at line 342 of file rational-gmp.cpp.

References getCreated(), and printStats().

CVCL::Rational::Rational const std::string &  n,
int  base = 10
 

CVCL::Rational::Rational const char *  n,
const char *  d,
int  base = 10
 

Definition at line 358 of file rational-gmp.cpp.

References getCreated(), and printStats().

CVCL::Rational::Rational const std::string &  n,
const std::string &  d,
int  base = 10
 

CVCL::Rational::~Rational  ) 
 

Definition at line 375 of file rational-gmp.cpp.

References d_n, getDeleted(), and printStats().


Member Function Documentation

int& CVCL::Rational::getCreated  )  [inline, private]
 

Definition at line 57 of file rational.h.

Referenced by printStats(), and Rational().

int& CVCL::Rational::getDeleted  )  [inline, private]
 

Definition at line 62 of file rational.h.

Referenced by printStats(), and ~Rational().

void CVCL::Rational::printStats  )  [private]
 

Definition at line 524 of file rational-gmp.cpp.

References d_n, std::endl(), getCreated(), and getDeleted().

Referenced by Rational(), and ~Rational().

Rational & CVCL::Rational::operator= const Rational n  ) 
 

Definition at line 393 of file rational-gmp.cpp.

References d_n.

string CVCL::Rational::toString int  base = 10  )  const
 

Definition at line 475 of file rational-gmp.cpp.

References d_n.

Referenced by CVCL::BitvectorTheoremProducer::bvplusConst(), CVCL::checkInt(), CVCL::ArithTheoremProducer::create_t(), CVCL::ArithTheoremProducer::create_t2(), CVCL::ArithTheoremProducer::create_t3(), CVCL::ArithTheoremProducer::f(), CVCL::TheoryArith::findBounds(), CVCL::Rational::Impl::getInt(), CVCL::Rational::Impl::getUnsigned(), hash(), CVCL::ExprRational::hash(), CVCL::ArithTheoremProducer::modEq(), CVCL::ArithTheoremProducer::monomialModM(), CVCL::ArithTheoremProducer::monomialMulF(), CVCL::TheoryBitvector::newBVConstExpr(), CVCL::operator<<(), CVCL::pow(), CVCL::TheoryArith::printRational(), and CVCL::TheoryArith::updateStats().

size_t CVCL::Rational::hash  )  const
 

Definition at line 479 of file rational-gmp.cpp.

References toString().

Rational CVCL::Rational::operator-  )  const
 

Definition at line 489 of file rational-gmp.cpp.

References d_n, and Rational().

Rational & CVCL::Rational::operator+= const Rational n2  ) 
 

Definition at line 493 of file rational-gmp.cpp.

Rational & CVCL::Rational::operator-= const Rational n2  ) 
 

Definition at line 498 of file rational-gmp.cpp.

Rational & CVCL::Rational::operator *= const Rational n2  ) 
 

Definition at line 503 of file rational-gmp.cpp.

Rational & CVCL::Rational::operator/= const Rational n2  ) 
 

Definition at line 508 of file rational-gmp.cpp.

const Rational& CVCL::Rational::operator++  )  [inline]
 

Prefix increment.

Definition at line 113 of file rational.h.

Rational CVCL::Rational::operator++ int   )  [inline]
 

Postfix increment.

Definition at line 115 of file rational.h.

const Rational& CVCL::Rational::operator--  )  [inline]
 

Prefix decrement.

Definition at line 117 of file rational.h.

Rational CVCL::Rational::operator-- int   )  [inline]
 

Postfix decrement.

Definition at line 119 of file rational.h.

Rational CVCL::Rational::getNumerator  )  const
 

Definition at line 385 of file rational-gmp.cpp.

References d_n, and Rational().

Referenced by CVCL::TheoryArith::computeNormalFactor(), and CVCL::TheoryArith::printRational().

Rational CVCL::Rational::getDenominator  )  const
 

Definition at line 387 of file rational-gmp.cpp.

References d_n, and Rational().

Referenced by CVCL::TheoryArith::computeNormalFactor(), and CVCL::TheoryArith::printRational().

bool CVCL::Rational::isInteger  )  const
 

Definition at line 390 of file rational-gmp.cpp.

References d_n.

Referenced by CVCL::TheoryArith::assignVariables(), CVCL::ArithTheoremProducer::canonPowConst(), CVCL::checkInt(), CVCL::TheoryArith::computeType(), CVCL::BitvectorTheoremProducer::constMultToPlus(), CVCL::ArithTheoremProducer::constRHSGrayShadow(), CVCL::VCCmd::evaluateCommand(), CVCL::ArithTheoremProducer::expandGrayShadow(), CVCL::ArithTheoremProducer::expandGrayShadowConst(), CVCL::Rational::Impl::getInt(), CVCL::ArithTheoremProducer::grayShadowConst(), CVCL::ArithTheoremProducer::intVarEqnConst(), CVCL::ArithTheoremProducer::isIntConst(), CVCL::isIntegerConst(), isUnsigned(), CVCL::TheoryBitvector::newBVConstExpr(), CVCL::TheoryRecords::parseExprOp(), CVCL::TheoryBitvector::parseExprOp(), CVCL::pow(), CVCL::TheoryArith::printRational(), and CVCL::ArithTheoremProducer::splitGrayShadow().

int CVCL::Rational::getInt  )  const
 

Definition at line 513 of file rational-gmp.cpp.

References CVCL::checkInt(), and d_n.

Referenced by CVCL::VCCmd::evaluateCommand(), CVCL::SimulateTheoremProducer::expandSimulate(), CVCL::TheoryBitvector::getBitvectorTypeParam(), CVCL::TheoryBitvector::getBoolExtractIndex(), CVCL::TheoryBitvector::getBVMultParam(), CVCL::TheoryBitvector::getBVPlusParam(), CVCL::TheoryBitvector::getExtractHi(), CVCL::TheoryBitvector::getExtractLow(), CVCL::TheoryBitvector::getFixedLeftShiftParam(), CVCL::TheoryBitvector::getFixedRightShiftParam(), CVCL::TheoryRecords::getIndex(), CVCL::TheoryBitvector::getSXIndex(), and CVCL::TheoryBitvector::parseExprOp().

bool CVCL::Rational::isUnsigned  )  const [inline]
 

Definition at line 130 of file rational.h.

References isInteger().

unsigned int CVCL::Rational::getUnsigned  )  const
 

Definition at line 518 of file rational-gmp.cpp.

References CVCL::checkInt(), and d_n.

void CVCL::Rational::print  )  const
 

Definition at line 484 of file rational-gmp.cpp.

References std::endl().


Friends And Related Function Documentation

bool operator== const Rational n1,
const Rational n2
[friend]
 

Definition at line 536 of file rational-gmp.cpp.

bool operator< const Rational n1,
const Rational n2
[friend]
 

Definition at line 540 of file rational-gmp.cpp.

bool operator<= const Rational n1,
const Rational n2
[friend]
 

Definition at line 544 of file rational-gmp.cpp.

bool operator> const Rational n1,
const Rational n2
[friend]
 

Definition at line 548 of file rational-gmp.cpp.

bool operator>= const Rational n1,
const Rational n2
[friend]
 

Definition at line 552 of file rational-gmp.cpp.

bool operator!= const Rational n1,
const Rational n2
[friend]
 

Definition at line 556 of file rational-gmp.cpp.

Rational operator+ const Rational n1,
const Rational n2
[friend]
 

Definition at line 560 of file rational-gmp.cpp.

Rational operator- const Rational n1,
const Rational n2
[friend]
 

Definition at line 564 of file rational-gmp.cpp.

Rational operator * const Rational n1,
const Rational n2
[friend]
 

Definition at line 568 of file rational-gmp.cpp.

Rational operator/ const Rational n1,
const Rational n2
[friend]
 

Definition at line 572 of file rational-gmp.cpp.

Rational operator% const Rational n1,
const Rational n2
[friend]
 

Definition at line 576 of file rational-gmp.cpp.

std::ostream& operator<< std::ostream &  os,
const Rational n
[friend]
 

Rational gcd const Rational x,
const Rational y
[friend]
 

Definition at line 418 of file rational-gmp.cpp.

Rational gcd const std::vector< Rational > &  v  )  [friend]
 

Rational lcm const Rational x,
const Rational y
[friend]
 

Definition at line 440 of file rational-gmp.cpp.

Rational lcm const std::vector< Rational > &  v  )  [friend]
 

Rational abs const Rational x  )  [friend]
 

Definition at line 456 of file rational-gmp.cpp.

Rational floor const Rational x  )  [friend]
 

Compute the floor of x (result is an integer).

Definition at line 461 of file rational-gmp.cpp.

Rational ceil const Rational x  )  [friend]
 

Compute the ceiling of x (result is an integer).

Definition at line 465 of file rational-gmp.cpp.

Rational mod const Rational x,
const Rational y
[friend]
 

Compute non-negative remainder for *integer* x,y.

Definition at line 469 of file rational-gmp.cpp.


Member Data Documentation

Impl* CVCL::Rational::d_n [private]
 

Definition at line 51 of file rational.h.

Referenced by CVCL::Rational::Impl::canonicalize(), CVCL::ceil(), CVCL::floor(), CVCL::gcd(), CVCL::Rational::Impl::getDen(), getDenominator(), getInt(), CVCL::Rational::Impl::getInt(), CVCL::Rational::Impl::getNum(), getNumerator(), getUnsigned(), CVCL::Rational::Impl::getUnsigned(), CVCL::Rational::Impl::Impl(), isInteger(), CVCL::lcm(), CVCL::mod(), CVCL::operator *(), CVCL::operator!=(), CVCL::operator%(), CVCL::operator+(), CVCL::operator-(), operator-(), CVCL::operator/(), CVCL::operator<(), CVCL::operator<=(), operator=(), CVCL::Rational::Impl::operator=(), CVCL::operator==(), CVCL::operator>(), CVCL::operator>=(), printStats(), toString(), CVCL::Rational::Impl::toString(), CVCL::Rational::Impl::~Impl(), and ~Rational().


The documentation for this class was generated from the following files:
Generated on Thu Apr 13 16:57:43 2006 for CVC Lite by  doxygen 1.4.4