source: git/Singular/claptmpl.cc @ 020ef9

spielwiese
Last change on this file since 020ef9 was 599326, checked in by Kai Krüger <krueger@…>, 14 years ago
Anne, Kai, Frank: - changes to #include "..." statements to allow cleaner build structure - affected directories: omalloc, kernel, Singular - not yet done: IntergerProgramming git-svn-id: file:///usr/local/Singular/svn/trunk@13032 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 9.0 KB
Line 
1// emacs edit mode for this file is -*- C++ -*-
2/****************************************
3*  Computer Algebra System SINGULAR     *
4****************************************/
5// $Id$
6/*
7* ABSTRACT - instantiation of all templates
8*/
9
10#include <Singular/mod2.h>
11//#include <vector>
12//using namespace std;
13#ifdef HAVE_FACTORY
14  #define SINGULAR 1
15  #include <factory.h>
16#endif
17
18#if defined(HAVE_FACTORY) || defined(HAVE_FGLM)
19  #include <templates/ftmpl_list.cc>
20  #ifdef HAVE_FGLM
21    #include <kernel/fglm.h>
22  #endif
23
24  #ifdef HAVE_FACTORY
25    #include <templates/ftmpl_array.cc>
26    #include <templates/ftmpl_factor.cc>
27    #include <templates/ftmpl_functions.h>
28    #include <templates/ftmpl_matrix.cc>
29
30    template class Factor<CanonicalForm>;
31    template class List<CFFactor>;
32    template class ListItem<CFFactor>;
33    template class ListItem<CanonicalForm>;
34    template class ListIterator<CFFactor>;
35    template class List<CanonicalForm>;
36    template class List<List<CanonicalForm> >;
37    template class ListIterator<CanonicalForm>;
38    template class Array<CanonicalForm>;
39    template class List<MapPair>;
40    template class ListItem<MapPair>;
41    template class ListIterator<MapPair>;
42    template class Matrix<CanonicalForm>;
43    template class SubMatrix<CanonicalForm>;
44    template class Array<REvaluation>;
45    template bool find ( const List<CanonicalForm> &, const CanonicalForm&);
46
47    //template class vector<poly>;
48    #ifndef NOSTREAMIO
49    template ostream & operator<<(ostream &, const List<Factor<CanonicalForm> > &);
50    template ostream & operator<<(ostream &, const List<List<CanonicalForm> > &);
51    template ostream & operator<<(ostream &, const List<Variable> &);
52    template ostream & operator<<(ostream &, const Matrix<Variable> &);
53    #endif
54
55    template List<CFFactor> Union ( const List<CFFactor>&, const List<CFFactor>& );
56    template int operator == ( const Factor<CanonicalForm>&, const Factor<CanonicalForm>& );
57
58    template CanonicalForm tmax ( const CanonicalForm&, const CanonicalForm& );
59    template CanonicalForm tmin ( const CanonicalForm&, const CanonicalForm& );
60
61    template Variable tmax ( const Variable&, const Variable& );
62    template Variable tmin ( const Variable&, const Variable& );
63
64    template int tmax ( const int&, const int& );
65    template int tmin ( const int&, const int& );
66    template int tabs ( const int& );
67
68  #endif
69// place here your own template stuff, not instantiated by factory
70  // libfac:
71    #include <factor.h>
72
73// class.h:
74template <class T>
75class Substitution {
76private:
77    T _factor;
78    T _exp;
79public:
80    Substitution() : _factor(1), _exp(0) {}
81    Substitution( const Substitution<T> & f ) : _factor(f._factor), _exp(f._exp) {}
82    Substitution( const T & f, const T & e ) : _factor(f), _exp(e) {}
83    Substitution( const T & f ) : _factor(f), _exp(1) {}
84    ~Substitution() {}
85    Substitution<T>& operator= ( const Substitution<T>& );
86    Substitution<T>& operator= ( const T& );
87    T factor() const { return _factor; }
88    T exp() const { return _exp; }
89#ifndef NOSTREAMIO
90    //friend ostream & operator <<<>(ostream &, Substitution<T> &);
91    void print ( ostream& s ) const
92    {
93      s << "("  << factor() << ")^" << exp();
94    }
95#endif
96};
97template <class T>
98int operator== ( const Substitution<T>&, const Substitution<T>& );
99
100// class.cc
101template <class T>
102Substitution<T>& Substitution<T>::operator= ( const Substitution<T>& f )
103{
104    if ( this != &f ) {
105        _factor = f._factor;
106        _exp = f._exp;
107    }
108    return *this;
109}
110
111template <class T>
112Substitution<T>& Substitution<T>::operator= ( const T & f )
113{
114    _factor = f;
115    _exp = 1;
116    return *this;
117}
118
119#ifndef NOSTREAMIO
120template <class T>
121ostream & operator <<(ostream & os, Substitution<T> &a)
122{
123  a.print(os);
124  return os;
125}
126template ostream & operator <<(ostream &, Substitution<CanonicalForm> &);
127template ostream & operator <<(ostream &, const List<CanonicalForm> &);
128template ostream & operator <<(ostream &, const Array<CanonicalForm> &);
129template ostream & operator<<(ostream &, const List<Substitution<CanonicalForm> > &);
130#endif
131
132template <class T>
133int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 )
134{
135    return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor());
136}
137
138    template class List<int>;
139    template class ListIterator<int>;
140
141    template class List<IntList>;
142    template class ListIterator<IntList>;
143
144    template class Substitution<CanonicalForm>;
145    template class Array<Variable>;
146    template class Array<int>;
147    typedef Substitution<CanonicalForm> SForm ;
148    template class List<SForm>;
149    template class ListIterator<SForm>;
150    template class List<Variable>;
151    template class ListIterator<Variable> ;
152
153    template List<Variable> Union ( const List<Variable>&, const List<Variable>& );
154    template List<Variable> Difference ( const List<Variable>&, const List<Variable>& );
155
156    template List<CanonicalForm> Union ( const List<CanonicalForm>&, const List<CanonicalForm>& );
157    template List<CanonicalForm> Difference ( const List<CanonicalForm>&, const List<CanonicalForm>& );
158
159// for charsets:
160    template class ListIterator<CFList>;
161
162#endif
163
164#ifdef HAVE_FGLM
165// templates for fglm:
166
167  template class List<fglmSelem>;
168  template class ListIterator<fglmSelem>;
169
170  template class List<fglmDelem>;
171  template class ListIterator<fglmDelem>;
172#endif
173
174// ----------------------------------------------------------------------------
175//  kmatrix.cc
176//  begin of file
177//  Stephan Endrass, endrass@mathematik.uni-mainz.de
178//  23.7.99
179// ----------------------------------------------------------------------------
180
181#ifdef HAVE_SPECTRUM
182
183#ifdef   KMATRIX_PRINT
184#include <iostream.h>
185#ifndef   KMATRIX_IOSTREAM
186#include <stdio.h>
187#endif
188#endif
189
190#include <kernel/GMPrat.h>
191#include <kernel/kmatrix.h>
192
193template    class   KMatrix<Rational>;
194
195#ifdef   KMATRIX_PRINT
196template    ostream &   operator << ( ostream&,const KMatrix<Rational>& );
197template    static  void    print_rational( ostream&,int,const Rational& );
198#endif
199
200#endif /* HAVE_SPECTRUM */
201// ----------------------------------------------------------------------------
202//  kmatrix.cc
203//  end of file
204// ----------------------------------------------------------------------------
205
206#ifdef HAVE_PLURAL
207
208#include <kernel/ncSACache.h> // for CCacheHash etc classes
209#include <kernel/ncSAMult.h> // for CMultiplier etc classes
210
211template class CMultiplier<int>;
212template class CMultiplier<poly>;
213template class CMultiplier<CPower>;
214
215template class CCacheHash<poly>;
216template class CCacheHash<int>;
217
218#endif
219
220#include <kernel/tgb_internal.h>
221#ifdef HAVE_BOOST
222#include <boost/dynamic_bitset.hpp>
223#include <vector>
224using std::vector;
225using boost::dynamic_bitset;
226template class dynamic_bitset<>;
227template class vector<dynamic_bitset<> >;
228#elif defined(USE_STDVECBOOL)
229#include <vector>
230using std::vector;
231template class vector<bool>;
232template class vector<vector<bool> >;
233#endif
234
235template int pos_helper(kStrategy strat, poly p, int len, intset  setL, polyset set);
236template int pos_helper(kStrategy strat, poly p, wlen_type len, wlen_set setL, polyset set);
237#ifdef NORO_CACHE
238//template class std::map<PolySimple,std::pair<PolySimple,int> >;
239//#include <queue>
240template class std::vector<PolySimple>;
241//template class std::priority_queue<MonRedRes>;
242//template class std::vector<NoroPlaceHolder>;
243//template class std::vector<std::vector<NoroPlaceHolder> >;
244//template class std::vector<DataNoroCacheNode<tgb_uint16>* >;
245//template class std::vector<DataNoroCacheNode<tgb_uint8>* >;
246template class std::vector<DataNoroCacheNode<tgb_uint32>* >;
247//template SparseRow<tgb_uint16> * noro_red_to_non_poly_t<tgb_uint16>(poly p, int &len, NoroCache<tgb_uint16>* cache,slimgb_alg* c);
248template SparseRow<tgb_uint32>* noro_red_to_non_poly_t<tgb_uint32>(poly p, int &len, NoroCache<tgb_uint32>* cache,slimgb_alg* c);
249//template SparseRow<tgb_uint8>* noro_red_to_non_poly_t<tgb_uint8>(poly p, int &len, NoroCache<tgb_uint8>* cache,slimgb_alg* c);
250//template void simplest_gauss_modp<tgb_uint16> (tgb_uint16* a, int nrows,int ncols);
251template void simplest_gauss_modp<tgb_uint32> (tgb_uint32* a, int nrows,int ncols);
252//template void simplest_gauss_modp<tgb_uint8> (tgb_uint8* a, int nrows,int ncols);
253//template poly row_to_poly<tgb_uint8>(tgb_uint8* row, poly* terms, int tn, ring r);
254template poly row_to_poly<tgb_uint32>(tgb_uint32* row, poly* terms, int tn, ring r);
255//template poly row_to_poly<tgb_uint16>(tgb_uint16* row, poly* terms, int tn, ring r);
256template void noro_step<tgb_uint8>(poly*p,int &pn,slimgb_alg* c);
257template void noro_step<tgb_uint16>(poly*p,int &pn,slimgb_alg* c);
258template void noro_step<tgb_uint32>(poly*p,int &pn,slimgb_alg* c);
259//std::priority_queue<MonRedRes>
260//
261/* next lines are templates used in new minor code */
262#include <list>
263#include <Singular/Minor.h>
264#include <Singular/Cache.h>
265template class std::list<int>;
266template class std::list<MinorKey>;
267template class std::list<IntMinorValue>;
268template class std::list<PolyMinorValue>;
269template class Cache<MinorKey, IntMinorValue>;
270template class Cache<MinorKey, PolyMinorValue>;
271#endif
272//template int pos_helper(kStrategy strat, poly p, int len, intset setL, polyset set);
Note: See TracBrowser for help on using the repository browser.