source: git/libfac/factor/class.cc @ 36b7a3

spielwiese
Last change on this file since 36b7a3 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
Line 
1/* Copyright 1997 Michael Messollen. All rights reserved. */
2////////////////////////////////////////////////////////////
3// emacs edit mode for this file is -*- C++ -*-
4// $Id: class.cc,v 1.5 2008-03-18 17:46:15 Singular Exp $
5////////////////////////////////////////////////////////////
6
7// #pragma implementation
8
9#include "class.h"
10
11template <class T>
12Substitution<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
21template <class T>
22Substitution<T>& Substitution<T>::operator= ( const T & f )
23{
24    _factor = f;
25    _exp = 1;
26    return *this;
27}
28
29template <class T>
30int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 )
31{
32    return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor());
33}
34
35#ifndef NOSTREAMIO
36template <class T>
37void Substitution<T>::print ( OSTREAM& s ) const
38{
39        s << "(" << factor() << ")^" << exp();
40}
41#endif
42
43////////////////////////////////////////////////////////////
44/*
45$Log: not supported by cvs2svn $
46Revision 1.4  2006/05/16 14:58:54  hannes
47*hannes: gcc-4.1 fixes
48
49Revision 1.3  1997/09/12 07:19:53  Singular
50* hannes/michael: libfac-0.3.0
51
52Revision 1.3  1997/04/25 22:38:04  michael
53Version for libfac-0.2.1
54
55*/
Note: See TracBrowser for help on using the repository browser.