Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

Monomial Class Template Reference

#include <Polynomial.h>

List of all members.

Public Methods

 Monomial (const char *)
 Monomial (R coef=0, int numOfVars=0, const int *powersOfVars=NULL)
 Monomial (const Monomial &)
 ~Monomial ()
bool operator== (const Monomial &) const
Monomial& operator= (const Monomial &)
Monomial operator- () const
Monomial operator * (const Monomial &) const
Monomial operator+ (const Monomial &) const
Monomial& operator+= (const Monomial &)
int compare (const Monomial &) const
getCoefficient () const
void setCoefficient (const R &c)
int getNumberOfVariables () const
int getPowerOfVariable (int i) const
void setPowerOfVariable (int i, int v)

Private Methods

void printOn (ostream &) const
Monomial readFrom (istream &istr, Chars &errMesg)

Private Attributes

theCoefficient
int numberOfVariables
int* powersOfVariables

Friends

class  Polynomial< R >
ostream& operator (ostream &ostr, const Monomial< R > &M)
IStreamPoll operator>> (istream &istr, Monomial< R > &M)
ostream& operator (ostream &ostr, const Monomial< R > &M)
istream& operator> (istream &istr, Monomial< R > &M)

template<class R> class Monomial


Constructor & Destructor Documentation

template<class R>
Monomial<R>::Monomial<R> ( const char * )
 

template<class R>
Monomial<R>::Monomial<R> ( R coef = 0,
int numOfVars = 0,
const int * powersOfVars = NULL )
 

template<class R>
Monomial<R>::Monomial<R> ( const Monomial<R> & )
 

template<class R>
Monomial<R>::~Monomial<R> ( ) [inline]
 

Definition at line 96 of file Polynomial.h.


Member Function Documentation

template<class R>
bool Monomial<R>::operator== ( const Monomial<R> & ) const
 

template<class R>
Monomial<R>& Monomial<R>::operator= ( const Monomial<R> & )
 

template<class R>
Monomial<R> Monomial<R>::operator- ( ) const
 

template<class R>
Monomial<R> Monomial<R>::operator * ( const Monomial<R> & ) const
 

template<class R>
Monomial<R> Monomial<R>::operator+ ( const Monomial<R> & ) const
 

template<class R>
Monomial<R>& Monomial<R>::operator+= ( const Monomial<R> & )
 

template<class R>
int Monomial<R>::compare ( const Monomial<R> & ) const
 

template<class R>
R Monomial<R>::getCoefficient ( ) const [inline]
 

Definition at line 131 of file Polynomial.h.

Referenced by Polynomial::theKeyIsFound().

template<class R>
void Monomial<R>::setCoefficient ( const R & c ) [inline]
 

Definition at line 133 of file Polynomial.h.

template<class R>
int Monomial<R>::getNumberOfVariables ( ) const [inline]
 

Definition at line 135 of file Polynomial.h.

template<class R>
int Monomial<R>::getPowerOfVariable ( int i ) const
 

template<class R>
void Monomial<R>::setPowerOfVariable ( int i,
int v )
 

template<class R>
void Monomial<R>::printOn ( ostream & ) const [private]
 

template<class R>
Monomial<R> Monomial<R>::readFrom ( istream & istr,
Chars & errMesg ) [inline, private]
 

Definition at line 181 of file Polynomial.h.

Referenced by operator>>().


Friends And Related Function Documentation

template<class R>
friend class Polynomial< R > [friend]
 

Definition at line 79 of file Polynomial.h.

template<class R>
ostream& operator ( ostream & ostr,
const Monomial< R > & M ) [friend]
 

template<class R>
IStreamPoll operator>> ( istream & istr,
Monomial< R > & M ) [friend]
 

Definition at line 50 of file Polynomial.h.

template<class R>
ostream& operator ( ostream & ostr,
const Monomial< R > & M ) [friend]
 

template<class R>
istream& operator> ( istream & istr,
Monomial< R > & M ) [friend]
 

Definition at line 67 of file Polynomial.h.


Member Data Documentation

template<class R>
R Monomial<R>::theCoefficient [private]
 

Definition at line 168 of file Polynomial.h.

template<class R>
int Monomial<R>::numberOfVariables [private]
 

Definition at line 169 of file Polynomial.h.

template<class R>
int* Monomial<R>::powersOfVariables [private]
 

Definition at line 170 of file Polynomial.h.


The documentation for this class was generated from the following file:
Generated at Tue Jun 19 09:49:58 2001 for Magnus Classes by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001