jengelhdatetimespielwiese
Last change
on this file since 18500b was
18500b,
checked in by Martin Lee <martinlee84@…>, 11 years ago

chg: moved libfac back


Property mode set to
100644

File size:
836 bytes

Rev  Line  

[1a80b4]  1  //////////////////////////////////////////////////////////// 

 2  // emacs edit mode for this file is * C++ * 

 3  //////////////////////////////////////////////////////////// 

 4  

 5  // #pragma implementation 

 6  

 7  #include "class.h" 

 8  

 9  template <class T> 

 10  Substitution<T>& Substitution<T>::operator= ( const Substitution<T>& f ) 

 11  { 

 12  if ( this != &f ) { 

 13  _factor = f._factor; 

 14  _exp = f._exp; 

 15  } 

 16  return *this; 

 17  } 

 18  

 19  template <class T> 

 20  Substitution<T>& Substitution<T>::operator= ( const T & f ) 

 21  { 

 22  _factor = f; 

 23  _exp = 1; 

 24  return *this; 

 25  } 

 26  

 27  template <class T> 

 28  int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 ) 

 29  { 

 30  return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor()); 

 31  } 

 32  

[4a81ec]  33  #ifndef NOSTREAMIO 

[1a80b4]  34  template <class T> 

[55abfc]  35  void Substitution<T>::print ( OSTREAM& s ) const 

[1a80b4]  36  { 

 37  s << "(" << factor() << ")^" << exp(); 

 38  } 

[4a81ec]  39  #endif 

[1a80b4]  40  

Note: See
TracBrowser
for help on using the repository browser.