fieker-DuValspielwiese
Last change
on this file since d9edaf was
36b7a3,
checked in by Hans Schönemann <hannes@…>, 16 years ago
|
*hannes: gcc 4.2
git-svn-id: file:///usr/local/Singular/svn/trunk@10633 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[1a80b4] | 1 | /* Copyright 1997 Michael Messollen. All rights reserved. */ |
---|
| 2 | //////////////////////////////////////////////////////////// |
---|
| 3 | // emacs edit mode for this file is -*- C++ -*- |
---|
[36b7a3] | 4 | // $Id: class.cc,v 1.5 2008-03-18 17:46:15 Singular Exp $ |
---|
[1a80b4] | 5 | //////////////////////////////////////////////////////////// |
---|
| 6 | |
---|
| 7 | // #pragma implementation |
---|
| 8 | |
---|
| 9 | #include "class.h" |
---|
| 10 | |
---|
| 11 | template <class T> |
---|
| 12 | Substitution<T>& Substitution<T>::operator= ( const Substitution<T>& f ) |
---|
| 13 | { |
---|
| 14 | if ( this != &f ) { |
---|
| 15 | _factor = f._factor; |
---|
| 16 | _exp = f._exp; |
---|
| 17 | } |
---|
| 18 | return *this; |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | template <class T> |
---|
| 22 | Substitution<T>& Substitution<T>::operator= ( const T & f ) |
---|
| 23 | { |
---|
| 24 | _factor = f; |
---|
| 25 | _exp = 1; |
---|
| 26 | return *this; |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | template <class T> |
---|
| 30 | int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 ) |
---|
| 31 | { |
---|
| 32 | return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor()); |
---|
| 33 | } |
---|
| 34 | |
---|
[4a81ec] | 35 | #ifndef NOSTREAMIO |
---|
[1a80b4] | 36 | template <class T> |
---|
[55abfc] | 37 | void Substitution<T>::print ( OSTREAM& s ) const |
---|
[1a80b4] | 38 | { |
---|
| 39 | s << "(" << factor() << ")^" << exp(); |
---|
| 40 | } |
---|
[4a81ec] | 41 | #endif |
---|
[1a80b4] | 42 | |
---|
| 43 | //////////////////////////////////////////////////////////// |
---|
| 44 | /* |
---|
| 45 | $Log: not supported by cvs2svn $ |
---|
[36b7a3] | 46 | Revision 1.4 2006/05/16 14:58:54 hannes |
---|
| 47 | *hannes: gcc-4.1 fixes |
---|
| 48 | |
---|
[55abfc] | 49 | Revision 1.3 1997/09/12 07:19:53 Singular |
---|
| 50 | * hannes/michael: libfac-0.3.0 |
---|
| 51 | |
---|
[1a80b4] | 52 | Revision 1.3 1997/04/25 22:38:04 michael |
---|
| 53 | Version for libfac-0.2.1 |
---|
| 54 | |
---|
| 55 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.