source: git/factory/libfac/factor/class.cc @ 16055bd

jengelh-datetimespielwiese
Last change on this file since 16055bd was 16055bd, checked in by Martin Lee <martinlee84@…>, 11 years ago
chg: move libfac into factory
  • Property mode set to 100644
File size: 836 bytes
Line 
1////////////////////////////////////////////////////////////
2// emacs edit mode for this file is -*- C++ -*-
3////////////////////////////////////////////////////////////
4
5// #pragma implementation
6
7#include "class.h"
8
9template <class T>
10Substitution<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
19template <class T>
20Substitution<T>& Substitution<T>::operator= ( const T & f )
21{
22    _factor = f;
23    _exp = 1;
24    return *this;
25}
26
27template <class T>
28int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 )
29{
30    return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor());
31}
32
33#ifndef NOSTREAMIO
34template <class T>
35void Substitution<T>::print ( OSTREAM& s ) const
36{
37        s << "(" << factor() << ")^" << exp();
38}
39#endif
40
Note: See TracBrowser for help on using the repository browser.