source: git/factory/libfac/factor/class.cc @ dccceb

spielwiese
Last change on this file since dccceb was dccceb, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
moved libfac under factory/ CHG: moved libfac/ under factory/ Note: starting to merge libfac into factory (as a private library)
  • Property mode set to 100644
File size: 844 bytes
RevLine 
[1a80b4]1////////////////////////////////////////////////////////////
2// emacs edit mode for this file is -*- C++ -*-
[341696]3// $Id$
[1a80b4]4////////////////////////////////////////////////////////////
5
6// #pragma implementation
7
8#include "class.h"
9
10template <class T>
11Substitution<T>& Substitution<T>::operator= ( const Substitution<T>& f )
12{
13    if ( this != &f ) {
14        _factor = f._factor;
15        _exp = f._exp;
16    }
17    return *this;
18}
19
20template <class T>
21Substitution<T>& Substitution<T>::operator= ( const T & f )
22{
23    _factor = f;
24    _exp = 1;
25    return *this;
26}
27
28template <class T>
29int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 )
30{
31    return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor());
32}
33
[4a81ec]34#ifndef NOSTREAMIO
[1a80b4]35template <class T>
[55abfc]36void Substitution<T>::print ( OSTREAM& s ) const
[1a80b4]37{
38        s << "(" << factor() << ")^" << exp();
39}
[4a81ec]40#endif
[1a80b4]41
Note: See TracBrowser for help on using the repository browser.