source: git/Singular/claptmpl.cc @ 2d10dab

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