Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

BigInt Class Reference

#include <bigint1.h>


Public Methods

 BigInt ()
 BigInt (int)
 BigInt (const apstring &)
const BigInt& operator+= (const BigInt &)
const BigInt& operator-= (const BigInt &)
const BigInt& operator *= (const BigInt &)
const BigInt& operator *= (int num)
apstring ToString () const
int ToInt () const
double ToDouble () const
bool Equal (const BigInt &rhs) const
bool LessThan (const BigInt &rhs) const
void Print (ostream &os) const

Private Types

enum  Sign { positive, negative }

Private Methods

bool IsNegative () const
bool IsPositive () const
int NumDigits () const
int GetDigit (int k) const
void AddSigDigit (int value)
void ChangeDigit (int k, int value)
void Normalize ()

Private Attributes

Sign mySign
apvector<char> myDigits
int myNumDigits


Member Enumeration Documentation

enum BigInt::Sign [private]
 

Enumeration values:
positive  
negative  

Definition at line 110 of file bigint1.h.


Constructor & Destructor Documentation

BigInt::BigInt ( )
 

BigInt::BigInt ( int )
 

BigInt::BigInt ( const apstring & )
 


Member Function Documentation

void BigInt::AddSigDigit ( int value ) [private]
 

void BigInt::ChangeDigit ( int k,
int value ) [private]
 

bool BigInt::Equal ( const BigInt & rhs ) const
 

Referenced by operator==().

int BigInt::GetDigit ( int k ) const [private]
 

bool BigInt::IsNegative ( ) const [private]
 

bool BigInt::IsPositive ( ) const [private]
 

bool BigInt::LessThan ( const BigInt & rhs ) const
 

Referenced by operator<().

void BigInt::Normalize ( ) [private]
 

int BigInt::NumDigits ( ) const [private]
 

void BigInt::Print ( ostream & os ) const
 

double BigInt::ToDouble ( ) const
 

int BigInt::ToInt ( ) const
 

apstring BigInt::ToString ( ) const
 

const BigInt& BigInt::operator *= ( int num )
 

const BigInt& BigInt::operator *= ( const BigInt & )
 

const BigInt& BigInt::operator+= ( const BigInt & )
 

const BigInt& BigInt::operator-= ( const BigInt & )
 


Field Documentation

apvector<char> BigInt::myDigits [private]
 

Definition at line 112 of file bigint1.h.

int BigInt::myNumDigits [private]
 

Definition at line 113 of file bigint1.h.

Sign BigInt::mySign [private]
 

Definition at line 111 of file bigint1.h.


The documentation for this class was generated from the following file:
Generated at Sun Feb 24 09:57:34 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001