1 | // emacs edit mode for this file is -*- C++ -*- |
---|
2 | /**************************************** |
---|
3 | * Computer Algebra System SINGULAR * |
---|
4 | ****************************************/ |
---|
5 | // $Id: claptmpl.cc,v 1.40 2007-02-22 14:46:51 bricken Exp $ |
---|
6 | /* |
---|
7 | * ABSTRACT - instantiation of all templates |
---|
8 | */ |
---|
9 | |
---|
10 | #include "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 "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 class vector<poly>; |
---|
46 | #ifndef NOSTREAMIO |
---|
47 | template ostream & operator<<(ostream &, const List<Factor<CanonicalForm> > &); |
---|
48 | template ostream & operator<<(ostream &, const List<List<CanonicalForm> > &); |
---|
49 | template ostream & operator<<(ostream &, const List<Variable> &); |
---|
50 | template ostream & operator<<(ostream &, const Matrix<Variable> &); |
---|
51 | #endif |
---|
52 | |
---|
53 | template List<CFFactor> Union ( const List<CFFactor>&, const List<CFFactor>& ); |
---|
54 | template int operator == ( const Factor<CanonicalForm>&, const Factor<CanonicalForm>& ); |
---|
55 | |
---|
56 | template CanonicalForm tmax ( const CanonicalForm&, const CanonicalForm& ); |
---|
57 | template CanonicalForm tmin ( const CanonicalForm&, const CanonicalForm& ); |
---|
58 | |
---|
59 | template Variable tmax ( const Variable&, const Variable& ); |
---|
60 | template Variable tmin ( const Variable&, const Variable& ); |
---|
61 | |
---|
62 | template int tmax ( const int&, const int& ); |
---|
63 | template int tmin ( const int&, const int& ); |
---|
64 | template int tabs ( const int& ); |
---|
65 | |
---|
66 | #endif |
---|
67 | // place here your own template stuff, not instantiated by factory |
---|
68 | #ifdef HAVE_LIBFAC_P |
---|
69 | #include <factor.h> |
---|
70 | |
---|
71 | // class.h: |
---|
72 | template <class T> |
---|
73 | class Substitution { |
---|
74 | private: |
---|
75 | T _factor; |
---|
76 | T _exp; |
---|
77 | public: |
---|
78 | Substitution() : _factor(1), _exp(0) {} |
---|
79 | Substitution( const Substitution<T> & f ) : _factor(f._factor), _exp(f._exp) {} |
---|
80 | Substitution( const T & f, const T & e ) : _factor(f), _exp(e) {} |
---|
81 | Substitution( const T & f ) : _factor(f), _exp(1) {} |
---|
82 | ~Substitution() {} |
---|
83 | Substitution<T>& operator= ( const Substitution<T>& ); |
---|
84 | Substitution<T>& operator= ( const T& ); |
---|
85 | T factor() const { return _factor; } |
---|
86 | T exp() const { return _exp; } |
---|
87 | #ifndef NOSTREAMIO |
---|
88 | //friend ostream & operator <<<>(ostream &, Substitution<T> &); |
---|
89 | void print ( ostream& s ) const |
---|
90 | { |
---|
91 | s << "(" << factor() << ")^" << exp(); |
---|
92 | } |
---|
93 | #endif |
---|
94 | }; |
---|
95 | template <class T> |
---|
96 | int operator== ( const Substitution<T>&, const Substitution<T>& ); |
---|
97 | |
---|
98 | // class.cc |
---|
99 | template <class T> |
---|
100 | Substitution<T>& Substitution<T>::operator= ( const Substitution<T>& f ) |
---|
101 | { |
---|
102 | if ( this != &f ) { |
---|
103 | _factor = f._factor; |
---|
104 | _exp = f._exp; |
---|
105 | } |
---|
106 | return *this; |
---|
107 | } |
---|
108 | |
---|
109 | template <class T> |
---|
110 | Substitution<T>& Substitution<T>::operator= ( const T & f ) |
---|
111 | { |
---|
112 | _factor = f; |
---|
113 | _exp = 1; |
---|
114 | return *this; |
---|
115 | } |
---|
116 | |
---|
117 | #ifndef NOSTREAMIO |
---|
118 | template <class T> |
---|
119 | ostream & operator <<(ostream & os, Substitution<T> &a) |
---|
120 | { |
---|
121 | a.print(os); |
---|
122 | return os; |
---|
123 | } |
---|
124 | template ostream & operator <<(ostream &, Substitution<CanonicalForm> &); |
---|
125 | template ostream & operator <<(ostream &, const List<CanonicalForm> &); |
---|
126 | template ostream & operator <<(ostream &, const Array<CanonicalForm> &); |
---|
127 | template ostream & operator<<(ostream &, const List<Substitution<CanonicalForm> > &); |
---|
128 | #endif |
---|
129 | |
---|
130 | template <class T> |
---|
131 | int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 ) |
---|
132 | { |
---|
133 | return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor()); |
---|
134 | } |
---|
135 | |
---|
136 | template class List<int>; |
---|
137 | template class ListIterator<int>; |
---|
138 | |
---|
139 | template class List<IntList>; |
---|
140 | template class ListIterator<IntList>; |
---|
141 | |
---|
142 | template class Substitution<CanonicalForm>; |
---|
143 | template class Array<Variable>; |
---|
144 | template class Array<int>; |
---|
145 | typedef Substitution<CanonicalForm> SForm ; |
---|
146 | template class List<SForm>; |
---|
147 | template class ListIterator<SForm>; |
---|
148 | template class List<Variable>; |
---|
149 | template class ListIterator<Variable> ; |
---|
150 | |
---|
151 | template List<Variable> Union ( const List<Variable>&, const List<Variable>& ); |
---|
152 | template List<Variable> Difference ( const List<Variable>&, const List<Variable>& ); |
---|
153 | |
---|
154 | template List<CanonicalForm> Union ( const List<CanonicalForm>&, const List<CanonicalForm>& ); |
---|
155 | template List<CanonicalForm> Difference ( const List<CanonicalForm>&, const List<CanonicalForm>& ); |
---|
156 | |
---|
157 | // for charsets: |
---|
158 | template class ListIterator<CFList>; |
---|
159 | |
---|
160 | #endif |
---|
161 | #endif |
---|
162 | |
---|
163 | #ifdef HAVE_FGLM |
---|
164 | // templates for fglm: |
---|
165 | |
---|
166 | template class List<fglmSelem>; |
---|
167 | template class ListIterator<fglmSelem>; |
---|
168 | |
---|
169 | template class List<fglmDelem>; |
---|
170 | template class ListIterator<fglmDelem>; |
---|
171 | #endif |
---|
172 | |
---|
173 | // ---------------------------------------------------------------------------- |
---|
174 | // kmatrix.cc |
---|
175 | // begin of file |
---|
176 | // Stephan Endrass, endrass@mathematik.uni-mainz.de |
---|
177 | // 23.7.99 |
---|
178 | // ---------------------------------------------------------------------------- |
---|
179 | |
---|
180 | #ifdef HAVE_SPECTRUM |
---|
181 | |
---|
182 | #ifdef KMATRIX_PRINT |
---|
183 | #include <iostream.h> |
---|
184 | #ifndef KMATRIX_IOSTREAM |
---|
185 | #include <stdio.h> |
---|
186 | #endif |
---|
187 | #endif |
---|
188 | |
---|
189 | #include "GMPrat.h" |
---|
190 | #include "kmatrix.h" |
---|
191 | |
---|
192 | template class KMatrix<Rational>; |
---|
193 | |
---|
194 | #ifdef KMATRIX_PRINT |
---|
195 | template ostream & operator << ( ostream&,const KMatrix<Rational>& ); |
---|
196 | template static void print_rational( ostream&,int,const Rational& ); |
---|
197 | #endif |
---|
198 | |
---|
199 | #endif /* HAVE_SPECTRUM */ |
---|
200 | // ---------------------------------------------------------------------------- |
---|
201 | // kmatrix.cc |
---|
202 | // end of file |
---|
203 | // ---------------------------------------------------------------------------- |
---|
204 | #include "tgb_internal.h" |
---|
205 | #ifdef HAVE_BOOST |
---|
206 | #include <boost/dynamic_bitset.hpp> |
---|
207 | #include <vector> |
---|
208 | using std::vector; |
---|
209 | using boost::dynamic_bitset; |
---|
210 | template class dynamic_bitset<>; |
---|
211 | template class vector<dynamic_bitset<> >; |
---|
212 | #elif defined(USE_STDVECBOOL) |
---|
213 | #include <vector> |
---|
214 | using std::vector; |
---|
215 | template class vector<bool>; |
---|
216 | template class vector<vector<bool> >; |
---|
217 | #endif |
---|
218 | |
---|
219 | template int pos_helper(kStrategy strat, poly p, int len, intset setL, polyset set); |
---|
220 | template int pos_helper(kStrategy strat, poly p, wlen_type len, wlen_set setL, polyset set); |
---|
221 | #ifdef NORO_CACHE |
---|
222 | //template class std::map<PolySimple,std::pair<PolySimple,int> >; |
---|
223 | //#include <queue> |
---|
224 | template class std::vector<PolySimple>; |
---|
225 | //template class std::priority_queue<MonRedRes>; |
---|
226 | //template class std::vector<NoroPlaceHolder>; |
---|
227 | //template class std::vector<std::vector<NoroPlaceHolder> >; |
---|
228 | template class std::vector<DataNoroCacheNode*>; |
---|
229 | template SparseRow* noro_red_to_non_poly_t<tgb_uint16>(poly p, int &len, NoroCache* cache,slimgb_alg* c); |
---|
230 | template SparseRow* noro_red_to_non_poly_t<tgb_uint32>(poly p, int &len, NoroCache* cache,slimgb_alg* c); |
---|
231 | template SparseRow* noro_red_to_non_poly_t<tgb_uint8>(poly p, int &len, NoroCache* cache,slimgb_alg* c); |
---|
232 | template void simplest_gauss_modp<tgb_uint16> (tgb_uint16* a, int nrows,int ncols); |
---|
233 | template void simplest_gauss_modp<tgb_uint32> (tgb_uint32* a, int nrows,int ncols); |
---|
234 | template void simplest_gauss_modp<tgb_uint8> (tgb_uint8* a, int nrows,int ncols); |
---|
235 | template poly row_to_poly<tgb_uint8>(tgb_uint8* row, poly* terms, int tn, ring r); |
---|
236 | template poly row_to_poly<tgb_uint32>(tgb_uint32* row, poly* terms, int tn, ring r); |
---|
237 | template poly row_to_poly<tgb_uint16>(tgb_uint16* row, poly* terms, int tn, ring r); |
---|
238 | //std::priority_queue<MonRedRes> |
---|
239 | #endif |
---|
240 | //template int pos_helper(kStrategy strat, poly p, int len, intset setL, polyset set); |
---|