source: git/Singular/claptmpl.cc @ c45b8f0

spielwiese
Last change on this file since c45b8f0 was d4df72, checked in by Frank Seelisch <seelisch@…>, 14 years ago
including ZCone code to link with gfan lib git-svn-id: file:///usr/local/Singular/svn/trunk@13559 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 9.1 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 <kernel/mod2.h>
11//#include <vector>
12//using namespace std;
13#ifdef HAVE_FACTORY
14  #define SINGULAR 1
15  #include <factory/factory.h>
16  #include <factory/templates/ftmpl_list.cc>
17  #include <kernel/fglm.h>
18
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>
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 <libfac/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#ifdef HAVE_FANS
166#include <gfanlib/gfanlib.h>
167#endif
168
169// ----------------------------------------------------------------------------
170//  kmatrix.cc
171//  begin of file
172//  Stephan Endrass, endrass@mathematik.uni-mainz.de
173//  23.7.99
174// ----------------------------------------------------------------------------
175
176#ifdef HAVE_SPECTRUM
177
178#ifdef   KMATRIX_PRINT
179#include <iostream.h>
180#ifndef   KMATRIX_IOSTREAM
181#include <stdio.h>
182#endif
183#endif
184
185#include <kernel/GMPrat.h>
186#include <kernel/kmatrix.h>
187
188template    class   KMatrix<Rational>;
189
190#ifdef   KMATRIX_PRINT
191template    OSTREAM &   operator << ( OSTREAM&,const KMatrix<Rational>& );
192template    static  void    print_rational( OSTREAM&,int,const Rational& );
193#endif
194
195#endif /* HAVE_SPECTRUM */
196// ----------------------------------------------------------------------------
197//  kmatrix.cc
198//  end of file
199// ----------------------------------------------------------------------------
200
201#ifdef HAVE_PLURAL
202
203#include <kernel/ncSACache.h> // for CCacheHash etc classes
204#include <kernel/ncSAMult.h> // for CMultiplier etc classes
205
206template class CMultiplier<int>;
207template class CMultiplier<poly>;
208template class CMultiplier<CPower>;
209
210template class CCacheHash<poly>;
211template class CCacheHash<int>;
212
213#endif
214
215#include <kernel/tgb_internal.h>
216#ifdef HAVE_BOOST
217#include <boost/dynamic_bitset.hpp>
218#include <vector>
219using std::vector;
220using boost::dynamic_bitset;
221template class dynamic_bitset<>;
222template class vector<dynamic_bitset<> >;
223#elif defined(USE_STDVECBOOL)
224#include <vector>
225using std::vector;
226template class vector<bool>;
227template class vector<vector<bool> >;
228#endif
229
230template int pos_helper(kStrategy strat, poly p, int len, intset  setL, polyset set);
231template int pos_helper(kStrategy strat, poly p, wlen_type len, wlen_set setL, polyset set);
232#ifdef NORO_CACHE
233//template class std::map<PolySimple,std::pair<PolySimple,int> >;
234//#include <queue>
235template class std::vector<PolySimple>;
236//template class std::priority_queue<MonRedRes>;
237//template class std::vector<NoroPlaceHolder>;
238//template class std::vector<std::vector<NoroPlaceHolder> >;
239//template class std::vector<DataNoroCacheNode<tgb_uint16>* >;
240//template class std::vector<DataNoroCacheNode<tgb_uint8>* >;
241template class std::vector<DataNoroCacheNode<tgb_uint32>* >;
242//template SparseRow<tgb_uint16> * noro_red_to_non_poly_t<tgb_uint16>(poly p, int &len, NoroCache<tgb_uint16>* cache,slimgb_alg* c);
243template SparseRow<tgb_uint32>* noro_red_to_non_poly_t<tgb_uint32>(poly p, int &len, NoroCache<tgb_uint32>* cache,slimgb_alg* c);
244//template SparseRow<tgb_uint8>* noro_red_to_non_poly_t<tgb_uint8>(poly p, int &len, NoroCache<tgb_uint8>* cache,slimgb_alg* c);
245//template void simplest_gauss_modp<tgb_uint16> (tgb_uint16* a, int nrows,int ncols);
246template void simplest_gauss_modp<tgb_uint32> (tgb_uint32* a, int nrows,int ncols);
247//template void simplest_gauss_modp<tgb_uint8> (tgb_uint8* a, int nrows,int ncols);
248//template poly row_to_poly<tgb_uint8>(tgb_uint8* row, poly* terms, int tn, ring r);
249template poly row_to_poly<tgb_uint32>(tgb_uint32* row, poly* terms, int tn, ring r);
250//template poly row_to_poly<tgb_uint16>(tgb_uint16* row, poly* terms, int tn, ring r);
251template void noro_step<tgb_uint8>(poly*p,int &pn,slimgb_alg* c);
252template void noro_step<tgb_uint16>(poly*p,int &pn,slimgb_alg* c);
253template void noro_step<tgb_uint32>(poly*p,int &pn,slimgb_alg* c);
254//std::priority_queue<MonRedRes>
255//
256/* next lines are templates used in new minor code */
257#include <list>
258#include <Singular/Minor.h>
259#include <Singular/Cache.h>
260template class std::list<int>;
261template class std::list<MinorKey>;
262template class std::list<IntMinorValue>;
263template class std::list<PolyMinorValue>;
264template class Cache<MinorKey, IntMinorValue>;
265template class Cache<MinorKey, PolyMinorValue>;
266#endif
267
268#ifdef HAVE_FANS
269template class gfan::Vector<gfan::Integer>;
270template class gfan::Vector<gfan::Rational>;
271template class gfan::Matrix<gfan::Integer>;
272template class gfan::Matrix<gfan::Rational>;
273#endif
274//template int pos_helper(kStrategy strat, poly p, int len, intset setL, polyset set);
Note: See TracBrowser for help on using the repository browser.