source: git/libfac/factor/class.cc @ 5d0556

fieker-DuValspielwiese
Last change on this file since 5d0556 was 91b36d, checked in by Hans Schönemann <hannes@…>, 16 years ago
*hannes: licence stuff git-svn-id: file:///usr/local/Singular/svn/trunk@10750 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.2 KB
Line 
1////////////////////////////////////////////////////////////
2// emacs edit mode for this file is -*- C++ -*-
3// $Id: class.cc,v 1.6 2008-06-10 14:49:16 Singular Exp $
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
34#ifndef NOSTREAMIO
35template <class T>
36void Substitution<T>::print ( OSTREAM& s ) const
37{
38        s << "(" << factor() << ")^" << exp();
39}
40#endif
41
42////////////////////////////////////////////////////////////
43/*
44$Log: not supported by cvs2svn $
45Revision 1.5  2008/03/18 17:46:15  Singular
46*hannes: gcc 4.2
47
48Revision 1.4  2006/05/16 14:58:54  hannes
49*hannes: gcc-4.1 fixes
50
51Revision 1.3  1997/09/12 07:19:53  Singular
52* hannes/michael: libfac-0.3.0
53
54Revision 1.3  1997/04/25 22:38:04  michael
55Version for libfac-0.2.1
56
57*/
Note: See TracBrowser for help on using the repository browser.