spielwiese
Last change
on this file since dccceb was
dccceb,
checked in by Oleksandr Motsak <motsak@…>, 11 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
|
Line | |
---|
1 | //////////////////////////////////////////////////////////// |
---|
2 | // emacs edit mode for this file is -*- C++ -*- |
---|
3 | // $Id$ |
---|
4 | //////////////////////////////////////////////////////////// |
---|
5 | |
---|
6 | // #pragma implementation |
---|
7 | |
---|
8 | #include "class.h" |
---|
9 | |
---|
10 | template <class T> |
---|
11 | Substitution<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 | |
---|
20 | template <class T> |
---|
21 | Substitution<T>& Substitution<T>::operator= ( const T & f ) |
---|
22 | { |
---|
23 | _factor = f; |
---|
24 | _exp = 1; |
---|
25 | return *this; |
---|
26 | } |
---|
27 | |
---|
28 | template <class T> |
---|
29 | int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 ) |
---|
30 | { |
---|
31 | return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor()); |
---|
32 | } |
---|
33 | |
---|
34 | #ifndef NOSTREAMIO |
---|
35 | template <class T> |
---|
36 | void Substitution<T>::print ( OSTREAM& s ) const |
---|
37 | { |
---|
38 | s << "(" << factor() << ")^" << exp(); |
---|
39 | } |
---|
40 | #endif |
---|
41 | |
---|
Note: See
TracBrowser
for help on using the repository browser.