/* emacs edit mode for this file is -*- C++ -*- */ /* $Id$ */ #include template Factor& Factor::operator= ( const Factor& f ) { if ( this != &f ) { _factor = f._factor; _exp = f._exp; } return *this; } template Factor& Factor::operator= ( const T & f ) { _factor = f; _exp = 1; return *this; } template int operator== ( const Factor &f1, const Factor &f2 ) { return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor()); } #ifndef NOSTREAMIO template void Factor::print ( OSTREAM& s ) const { if ( exp() == 1 ) s << factor(); else s << "(" << factor() << ")^" << exp(); } template OSTREAM& operator<< ( OSTREAM & os, const Factor & f ) { f.print( os ); return os; } #endif /* NOSTREAMIO */