source: git/Singular/claptmpl.cc @ 7885020

spielwiese
Last change on this file since 7885020 was 7885020, checked in by Hans Schönemann <hannes@…>, 25 years ago
* hannes: integrated "spectrum" by Stefan Endrass, inactive by default (Makefile.in claptmpl.cc feResource.cc iparith.cc mod2.h.in tok.h GMPrat.h GMPrat.cc kmatrix.h multicnt.h multicnt.cc npolygon.h npolygon.cc semic.h semic.cc spectrum.h spectrum.cc splist.h splist.cc) git-svn-id: file:///usr/local/Singular/svn/trunk@3423 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 5.8 KB
RevLine 
[0e1846]1// emacs edit mode for this file is -*- C++ -*-
[e2f1c7]2/****************************************
3*  Computer Algebra System SINGULAR     *
4****************************************/
[7885020]5// $Id: claptmpl.cc,v 1.19 1999-08-12 10:57:32 Singular Exp $
[e2f1c7]6/*
7* ABSTRACT - instantiation of all templates
8*/
9
[0e1846]10#include "mod2.h"
11
[40edb03]12#ifdef HAVE_FACTORY
[623e7c]13  #define SINGULAR 1
14  #include <factory.h>
[0e1846]15#endif
16
[40edb03]17#if defined(HAVE_FACTORY) || defined(HAVE_FGLM)
[41bcd7]18  #include <templates/ftmpl_list.cc>
[623e7c]19  #ifdef HAVE_FGLM
20    #include "fglm.h"
21  #endif
22
23  #ifdef HAVE_FACTORY
[41bcd7]24    #include <templates/ftmpl_array.cc>
25    #include <templates/ftmpl_factor.cc>
26    #include <templates/ftmpl_functions.h>
27    #include <templates/ftmpl_matrix.cc>
28    #ifdef __MWERKS__
[623e7c]29      template List<CanonicalForm> Difference<CanonicalForm>(const List<CanonicalForm>&,const List<CanonicalForm>&);
30      template List<CanonicalForm> Union<CanonicalForm>(const List<CanonicalForm>&,const List<CanonicalForm>&);
31      template List<CFFactor> Union<CFFactor>(const List<CFFactor>&,const List<CFFactor>&);
32      template List<Variable> Union<Variable> ( const List<Variable>&, const List<Variable>& );
33      template List<Variable> Difference<Variable> ( const List<Variable>&, const List<Variable>& );
[030f132]34      template int operator==<CanonicalForm> ( const Factor<CanonicalForm>&, const Factor<CanonicalForm>& );
[623e7c]35    #endif
36
37    template class Factor<CanonicalForm>;
38    template class List<CFFactor>;
39    template class ListItem<CFFactor>;
40    template class ListItem<CanonicalForm>;
41    template class ListIterator<CFFactor>;
42    template class List<CanonicalForm>;
43    template class ListIterator<CanonicalForm>;
44    template class Array<CanonicalForm>;
45    template class List<MapPair>;
46    template class ListItem<MapPair>;
47    template class ListIterator<MapPair>;
48    template class Matrix<CanonicalForm>;
49    template class SubMatrix<CanonicalForm>;
[954622]50    template class Array<REvaluation>;
[623e7c]51
[41bcd7]52    #ifndef __MWERKS__
[623e7c]53      template List<CFFactor> Union ( const List<CFFactor>&, const List<CFFactor>& );
[96bd24]54      template int operator == ( const Factor<CanonicalForm>&, const Factor<CanonicalForm>& );
[623e7c]55
56      template CanonicalForm tmax ( const CanonicalForm&, const CanonicalForm& );
57      template CanonicalForm tmin ( const CanonicalForm&, const CanonicalForm& );
58
[1b43cf]59      template Variable tmax ( const Variable&, const Variable& );
60      template Variable tmin ( const Variable&, const Variable& );
61
[623e7c]62      template int tmax ( const int&, const int& );
63      template int tmin ( const int&, const int& );
[1d4180]64      template int tabs ( const int& );
[623e7c]65    #endif
66
67  #endif
[0e1846]68// place here your own template stuff, not instantiated by factory
[623e7c]69  #ifdef HAVE_LIBFAC_P
70    #include <factor.h>
[dc32d42]71
72// class.h:
73template <class T>
74class Substitution {
75private:
76    T _factor;
77    T _exp;
78public:
79    Substitution() : _factor(1), _exp(0) {}
80    Substitution( const Substitution<T> & f ) : _factor(f._factor), _exp(f._exp) {}
81    Substitution( const T & f, const T & e ) : _factor(f), _exp(e) {}
82    Substitution( const T & f ) : _factor(f), _exp(1) {}
83    ~Substitution() {}
84    Substitution<T>& operator= ( const Substitution<T>& );
85    Substitution<T>& operator= ( const T& );
86    T factor() const { return _factor; }
87    T exp() const { return _exp; }
88    friend int operator== ( const Substitution<T>&, const Substitution<T>& );
89};
90
91// class.cc
92template <class T>
93Substitution<T>& Substitution<T>::operator= ( const Substitution<T>& f )
94{
95    if ( this != &f ) {
[5812c69]96        _factor = f._factor;
97        _exp = f._exp;
[dc32d42]98    }
99    return *this;
100}
101
102template <class T>
103Substitution<T>& Substitution<T>::operator= ( const T & f )
104{
105    _factor = f;
106    _exp = 1;
107    return *this;
108}
109
110template <class T>
111int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 )
112{
113    return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor());
114}
[0e1846]115
[623e7c]116    template class List<int>;
117    template class ListIterator<int>;
[0e1846]118
[623e7c]119    template class List<IntList>;
120    template class ListIterator<IntList>;
[0e1846]121
[623e7c]122    template class Substitution<CanonicalForm>;
123    template class Array<Variable>;
124    template class Array<int>;
125    typedef Substitution<CanonicalForm> SForm ;
126    template class List<SForm>;
127    template class ListIterator<SForm>;
128    template class List<Variable>;
129    template class ListIterator<Variable> ;
[0e1846]130
[41bcd7]131    #ifndef __MWERKS__
[623e7c]132      template List<Variable> Union ( const List<Variable>&, const List<Variable>& );
133      template List<Variable> Difference ( const List<Variable>&, const List<Variable>& );
[0e1846]134
[623e7c]135      template List<CanonicalForm> Union ( const List<CanonicalForm>&, const List<CanonicalForm>& );
136      template List<CanonicalForm> Difference ( const List<CanonicalForm>&, const List<CanonicalForm>& );
137    #endif
[0e1846]138
139// for charsets:
[623e7c]140    template class List<CFList>;
141    template class ListIterator<CFList>;
[0e1846]142
[623e7c]143  #endif
[0e1846]144#endif
145
146#ifdef HAVE_FGLM
147// templates for fglm:
148
[623e7c]149  template class List<fglmSelem>;
150  template class ListIterator<fglmSelem>;
[0e1846]151
[623e7c]152  template class List<fglmDelem>;
153  template class ListIterator<fglmDelem>;
[0e1846]154#endif
[7885020]155
156// ----------------------------------------------------------------------------
157//  kmatrix.cc
158//  begin of file
159//  Stephan Endrass, endrass@mathematik.uni-mainz.de
160//  23.7.99
161// ----------------------------------------------------------------------------
162
163#ifdef HAVE_SPECTRUM
164
165#ifdef   KMATRIX_PRINT
166#include <iostream.h>
167#ifndef   KMATRIX_IOSTREAM
168#include <stdio.h>
169#endif
170#endif
171
172#include "GMPrat.h"
173#include "kmatrix.h"
174
175template    class   KMatrix<Rational>;
176
177#ifdef   KMATRIX_PRINT
178template    ostream &   operator << ( ostream&,const KMatrix<Rational>& );
179template    static  void    print_rational( ostream&,int,const Rational& );
180#endif
181
182#endif /* HAVE_SPECTRUM */
183// ----------------------------------------------------------------------------
184//  kmatrix.cc
185//  end of file
186// ----------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.