[0d217d] | 1 | // emacs edit mode for this file is -*- C++ -*- |
---|
| 2 | /**************************************** |
---|
| 3 | * Computer Algebra System SINGULAR * |
---|
| 4 | ****************************************/ |
---|
[341696] | 5 | // $Id$ |
---|
[0d217d] | 6 | /* |
---|
| 7 | * ABSTRACT - instantiation of all templates |
---|
| 8 | */ |
---|
| 9 | |
---|
[b1dfaf] | 10 | #include <kernel/mod2.h> |
---|
[58ebad] | 11 | //#include <vector> |
---|
| 12 | //using namespace std; |
---|
[0d217d] | 13 | #ifdef HAVE_FACTORY |
---|
| 14 | #define SINGULAR 1 |
---|
[b1dfaf] | 15 | #include <factory/factory.h> |
---|
| 16 | #include <factory/templates/ftmpl_list.cc> |
---|
[da8702] | 17 | #include <kernel/fglm.h> |
---|
| 18 | |
---|
[b1dfaf] | 19 | #include <factory/templates/ftmpl_array.cc> |
---|
| 20 | #include <factory/templates/ftmpl_factor.cc> |
---|
| 21 | #include <factory/templates/ftmpl_functions.h> |
---|
| 22 | #include <factory/templates/ftmpl_matrix.cc> |
---|
[da8702] | 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 |
---|
[2d10dab] | 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> &); |
---|
[0d217d] | 47 | #endif |
---|
| 48 | |
---|
[da8702] | 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& ); |
---|
[0d217d] | 61 | |
---|
[ccd1b0] | 62 | template CanonicalForm prod ( const List<CanonicalForm> & ); |
---|
| 63 | |
---|
[0d217d] | 64 | // place here your own template stuff, not instantiated by factory |
---|
[d3e630] | 65 | // libfac: |
---|
[b1dfaf] | 66 | #include <libfac/factor.h> |
---|
[0d217d] | 67 | |
---|
| 68 | // class.h: |
---|
| 69 | template <class T> |
---|
[da8702] | 70 | class Substitution |
---|
| 71 | { |
---|
[0d217d] | 72 | private: |
---|
| 73 | T _factor; |
---|
| 74 | T _exp; |
---|
| 75 | public: |
---|
| 76 | Substitution() : _factor(1), _exp(0) {} |
---|
| 77 | Substitution( const Substitution<T> & f ) : _factor(f._factor), _exp(f._exp) {} |
---|
| 78 | Substitution( const T & f, const T & e ) : _factor(f), _exp(e) {} |
---|
| 79 | Substitution( const T & f ) : _factor(f), _exp(1) {} |
---|
| 80 | ~Substitution() {} |
---|
| 81 | Substitution<T>& operator= ( const Substitution<T>& ); |
---|
| 82 | Substitution<T>& operator= ( const T& ); |
---|
| 83 | T factor() const { return _factor; } |
---|
| 84 | T exp() const { return _exp; } |
---|
| 85 | #ifndef NOSTREAMIO |
---|
[2d10dab] | 86 | //friend OSTREAM & operator <<<>(OSTREAM &, Substitution<T> &); |
---|
| 87 | void print ( OSTREAM& s ) const |
---|
[0d217d] | 88 | { |
---|
| 89 | s << "(" << factor() << ")^" << exp(); |
---|
| 90 | } |
---|
| 91 | #endif |
---|
| 92 | }; |
---|
| 93 | template <class T> |
---|
| 94 | int operator== ( const Substitution<T>&, const Substitution<T>& ); |
---|
| 95 | |
---|
| 96 | // class.cc |
---|
| 97 | template <class T> |
---|
| 98 | Substitution<T>& Substitution<T>::operator= ( const Substitution<T>& f ) |
---|
| 99 | { |
---|
| 100 | if ( this != &f ) { |
---|
| 101 | _factor = f._factor; |
---|
| 102 | _exp = f._exp; |
---|
| 103 | } |
---|
| 104 | return *this; |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | template <class T> |
---|
| 108 | Substitution<T>& Substitution<T>::operator= ( const T & f ) |
---|
| 109 | { |
---|
| 110 | _factor = f; |
---|
| 111 | _exp = 1; |
---|
| 112 | return *this; |
---|
| 113 | } |
---|
| 114 | |
---|
| 115 | #ifndef NOSTREAMIO |
---|
| 116 | template <class T> |
---|
[2d10dab] | 117 | OSTREAM & operator <<(OSTREAM & os, Substitution<T> &a) |
---|
[0d217d] | 118 | { |
---|
| 119 | a.print(os); |
---|
| 120 | return os; |
---|
| 121 | } |
---|
[2d10dab] | 122 | template OSTREAM & operator <<(OSTREAM &, Substitution<CanonicalForm> &); |
---|
| 123 | template OSTREAM & operator <<(OSTREAM &, const List<CanonicalForm> &); |
---|
| 124 | template OSTREAM & operator <<(OSTREAM &, const Array<CanonicalForm> &); |
---|
| 125 | template OSTREAM & operator<<(OSTREAM &, const List<Substitution<CanonicalForm> > &); |
---|
[0d217d] | 126 | #endif |
---|
| 127 | |
---|
| 128 | template <class T> |
---|
| 129 | int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 ) |
---|
| 130 | { |
---|
| 131 | return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor()); |
---|
| 132 | } |
---|
| 133 | |
---|
| 134 | template class List<int>; |
---|
| 135 | template class ListIterator<int>; |
---|
| 136 | |
---|
| 137 | template class List<IntList>; |
---|
| 138 | template class ListIterator<IntList>; |
---|
| 139 | |
---|
| 140 | template class Substitution<CanonicalForm>; |
---|
| 141 | template class Array<Variable>; |
---|
| 142 | template class Array<int>; |
---|
| 143 | typedef Substitution<CanonicalForm> SForm ; |
---|
| 144 | template class List<SForm>; |
---|
| 145 | template class ListIterator<SForm>; |
---|
| 146 | template class List<Variable>; |
---|
| 147 | template class ListIterator<Variable> ; |
---|
| 148 | |
---|
[111cfe] | 149 | template List<Variable> Union ( const List<Variable>&, const List<Variable>& ); |
---|
| 150 | template List<Variable> Difference ( const List<Variable>&, const List<Variable>& ); |
---|
[0d217d] | 151 | |
---|
[111cfe] | 152 | template List<CanonicalForm> Union ( const List<CanonicalForm>&, const List<CanonicalForm>& ); |
---|
| 153 | template List<CanonicalForm> Difference ( const List<CanonicalForm>&, const List<CanonicalForm>& ); |
---|
[0d217d] | 154 | |
---|
| 155 | // for charsets: |
---|
| 156 | template class ListIterator<CFList>; |
---|
| 157 | |
---|
| 158 | // templates for fglm: |
---|
| 159 | |
---|
| 160 | template class List<fglmSelem>; |
---|
| 161 | template class ListIterator<fglmSelem>; |
---|
| 162 | |
---|
| 163 | template class List<fglmDelem>; |
---|
| 164 | template class ListIterator<fglmDelem>; |
---|
| 165 | #endif |
---|
| 166 | |
---|
[d4df72] | 167 | #ifdef HAVE_FANS |
---|
| 168 | #include <gfanlib/gfanlib.h> |
---|
| 169 | #endif |
---|
| 170 | |
---|
[0d217d] | 171 | // ---------------------------------------------------------------------------- |
---|
| 172 | // kmatrix.cc |
---|
| 173 | // begin of file |
---|
| 174 | // Stephan Endrass, endrass@mathematik.uni-mainz.de |
---|
| 175 | // 23.7.99 |
---|
| 176 | // ---------------------------------------------------------------------------- |
---|
| 177 | |
---|
| 178 | #ifdef HAVE_SPECTRUM |
---|
| 179 | |
---|
| 180 | #ifdef KMATRIX_PRINT |
---|
| 181 | #include <iostream.h> |
---|
| 182 | #ifndef KMATRIX_IOSTREAM |
---|
| 183 | #include <stdio.h> |
---|
| 184 | #endif |
---|
| 185 | #endif |
---|
| 186 | |
---|
[599326] | 187 | #include <kernel/GMPrat.h> |
---|
| 188 | #include <kernel/kmatrix.h> |
---|
[0d217d] | 189 | |
---|
| 190 | template class KMatrix<Rational>; |
---|
| 191 | |
---|
| 192 | #ifdef KMATRIX_PRINT |
---|
[2d10dab] | 193 | template OSTREAM & operator << ( OSTREAM&,const KMatrix<Rational>& ); |
---|
| 194 | template static void print_rational( OSTREAM&,int,const Rational& ); |
---|
[0d217d] | 195 | #endif |
---|
| 196 | |
---|
| 197 | #endif /* HAVE_SPECTRUM */ |
---|
| 198 | // ---------------------------------------------------------------------------- |
---|
| 199 | // kmatrix.cc |
---|
| 200 | // end of file |
---|
| 201 | // ---------------------------------------------------------------------------- |
---|
[1495df4] | 202 | |
---|
| 203 | #ifdef HAVE_PLURAL |
---|
| 204 | |
---|
[599326] | 205 | #include <kernel/ncSAMult.h> // for CMultiplier etc classes |
---|
[1495df4] | 206 | |
---|
| 207 | template class CMultiplier<int>; |
---|
| 208 | template class CMultiplier<poly>; |
---|
| 209 | template class CMultiplier<CPower>; |
---|
| 210 | |
---|
[ef7b98] | 211 | // #include <kernel/ncSACache.h> // for CCacheHash etc classes |
---|
| 212 | // template class CCacheHash<poly>; |
---|
| 213 | // template class CCacheHash<int>; |
---|
[1495df4] | 214 | |
---|
| 215 | #endif |
---|
| 216 | |
---|
[599326] | 217 | #include <kernel/tgb_internal.h> |
---|
[26914c] | 218 | #ifdef HAVE_BOOST |
---|
| 219 | #include <boost/dynamic_bitset.hpp> |
---|
| 220 | #include <vector> |
---|
| 221 | using std::vector; |
---|
| 222 | using boost::dynamic_bitset; |
---|
| 223 | template class dynamic_bitset<>; |
---|
| 224 | template class vector<dynamic_bitset<> >; |
---|
[578270c] | 225 | #elif defined(USE_STDVECBOOL) |
---|
[4b7049] | 226 | #include <vector> |
---|
| 227 | using std::vector; |
---|
| 228 | template class vector<bool>; |
---|
| 229 | template class vector<vector<bool> >; |
---|
[26914c] | 230 | #endif |
---|
| 231 | |
---|
[58ebad] | 232 | template int pos_helper(kStrategy strat, poly p, int len, intset setL, polyset set); |
---|
[25061a] | 233 | template int pos_helper(kStrategy strat, poly p, wlen_type len, wlen_set setL, polyset set); |
---|
[89b59f] | 234 | #ifdef NORO_CACHE |
---|
[cc4d094] | 235 | //template class std::map<PolySimple,std::pair<PolySimple,int> >; |
---|
[7a7d813] | 236 | //#include <queue> |
---|
[89b59f] | 237 | template class std::vector<PolySimple>; |
---|
[7a7d813] | 238 | //template class std::priority_queue<MonRedRes>; |
---|
| 239 | //template class std::vector<NoroPlaceHolder>; |
---|
| 240 | //template class std::vector<std::vector<NoroPlaceHolder> >; |
---|
[5d51ebc] | 241 | //template class std::vector<DataNoroCacheNode<tgb_uint16>* >; |
---|
| 242 | //template class std::vector<DataNoroCacheNode<tgb_uint8>* >; |
---|
[5ac8e5] | 243 | template class std::vector<DataNoroCacheNode<tgb_uint32>* >; |
---|
[5d51ebc] | 244 | //template SparseRow<tgb_uint16> * noro_red_to_non_poly_t<tgb_uint16>(poly p, int &len, NoroCache<tgb_uint16>* cache,slimgb_alg* c); |
---|
[5ac8e5] | 245 | template SparseRow<tgb_uint32>* noro_red_to_non_poly_t<tgb_uint32>(poly p, int &len, NoroCache<tgb_uint32>* cache,slimgb_alg* c); |
---|
[5d51ebc] | 246 | //template SparseRow<tgb_uint8>* noro_red_to_non_poly_t<tgb_uint8>(poly p, int &len, NoroCache<tgb_uint8>* cache,slimgb_alg* c); |
---|
| 247 | //template void simplest_gauss_modp<tgb_uint16> (tgb_uint16* a, int nrows,int ncols); |
---|
[e9ade0f] | 248 | template void simplest_gauss_modp<tgb_uint32> (tgb_uint32* a, int nrows,int ncols); |
---|
[5d51ebc] | 249 | //template void simplest_gauss_modp<tgb_uint8> (tgb_uint8* a, int nrows,int ncols); |
---|
| 250 | //template poly row_to_poly<tgb_uint8>(tgb_uint8* row, poly* terms, int tn, ring r); |
---|
[e9ade0f] | 251 | template poly row_to_poly<tgb_uint32>(tgb_uint32* row, poly* terms, int tn, ring r); |
---|
[5d51ebc] | 252 | //template poly row_to_poly<tgb_uint16>(tgb_uint16* row, poly* terms, int tn, ring r); |
---|
[abce2e] | 253 | template void noro_step<tgb_uint8>(poly*p,int &pn,slimgb_alg* c); |
---|
| 254 | template void noro_step<tgb_uint16>(poly*p,int &pn,slimgb_alg* c); |
---|
| 255 | template void noro_step<tgb_uint32>(poly*p,int &pn,slimgb_alg* c); |
---|
[f2b5bfa] | 256 | //std::priority_queue<MonRedRes> |
---|
[ebee6c] | 257 | // |
---|
| 258 | /* next lines are templates used in new minor code */ |
---|
| 259 | #include <list> |
---|
[599326] | 260 | #include <Singular/Minor.h> |
---|
| 261 | #include <Singular/Cache.h> |
---|
[ebee6c] | 262 | template class std::list<int>; |
---|
| 263 | template class std::list<MinorKey>; |
---|
| 264 | template class std::list<IntMinorValue>; |
---|
| 265 | template class std::list<PolyMinorValue>; |
---|
| 266 | template class Cache<MinorKey, IntMinorValue>; |
---|
| 267 | template class Cache<MinorKey, PolyMinorValue>; |
---|
[89b59f] | 268 | #endif |
---|
[d4df72] | 269 | |
---|
| 270 | #ifdef HAVE_FANS |
---|
| 271 | template class gfan::Vector<gfan::Integer>; |
---|
| 272 | template class gfan::Vector<gfan::Rational>; |
---|
| 273 | template class gfan::Matrix<gfan::Integer>; |
---|
| 274 | template class gfan::Matrix<gfan::Rational>; |
---|
| 275 | #endif |
---|
[25061a] | 276 | //template int pos_helper(kStrategy strat, poly p, int len, intset setL, polyset set); |
---|