[0e1846] | 1 | // emacs edit mode for this file is -*- C++ -*- |
---|
[e2f1c7] | 2 | /**************************************** |
---|
| 3 | * Computer Algebra System SINGULAR * |
---|
| 4 | ****************************************/ |
---|
[638c809] | 5 | // $Id: claptmpl.cc,v 1.24 2000-07-06 13:26:22 pohl Exp $ |
---|
[e2f1c7] | 6 | /* |
---|
| 7 | * ABSTRACT - instantiation of all templates |
---|
| 8 | */ |
---|
| 9 | |
---|
[0e1846] | 10 | #include "mod2.h" |
---|
| 11 | |
---|
[40edb03] | 12 | #ifdef HAVE_FACTORY |
---|
[623e7c] | 13 | #define SINGULAR 1 |
---|
| 14 | #include <factory.h> |
---|
[0e1846] | 15 | #endif |
---|
| 16 | |
---|
[40edb03] | 17 | #if defined(HAVE_FACTORY) || defined(HAVE_FGLM) |
---|
[41bcd7] | 18 | #include <templates/ftmpl_list.cc> |
---|
[623e7c] | 19 | #ifdef HAVE_FGLM |
---|
| 20 | #include "fglm.h" |
---|
| 21 | #endif |
---|
| 22 | |
---|
| 23 | #ifdef HAVE_FACTORY |
---|
[41bcd7] | 24 | #include <templates/ftmpl_array.cc> |
---|
| 25 | #include <templates/ftmpl_factor.cc> |
---|
| 26 | #include <templates/ftmpl_functions.h> |
---|
| 27 | #include <templates/ftmpl_matrix.cc> |
---|
| 28 | #ifdef __MWERKS__ |
---|
[623e7c] | 29 | template List<CanonicalForm> Difference<CanonicalForm>(const List<CanonicalForm>&,const List<CanonicalForm>&); |
---|
| 30 | template List<CanonicalForm> Union<CanonicalForm>(const List<CanonicalForm>&,const List<CanonicalForm>&); |
---|
| 31 | template List<CFFactor> Union<CFFactor>(const List<CFFactor>&,const List<CFFactor>&); |
---|
| 32 | template List<Variable> Union<Variable> ( const List<Variable>&, const List<Variable>& ); |
---|
| 33 | template List<Variable> Difference<Variable> ( const List<Variable>&, const List<Variable>& ); |
---|
[030f132] | 34 | template int operator==<CanonicalForm> ( const Factor<CanonicalForm>&, const Factor<CanonicalForm>& ); |
---|
[623e7c] | 35 | #endif |
---|
| 36 | |
---|
| 37 | template class Factor<CanonicalForm>; |
---|
| 38 | template class List<CFFactor>; |
---|
| 39 | template class ListItem<CFFactor>; |
---|
| 40 | template class ListItem<CanonicalForm>; |
---|
| 41 | template class ListIterator<CFFactor>; |
---|
| 42 | template class List<CanonicalForm>; |
---|
| 43 | template class ListIterator<CanonicalForm>; |
---|
| 44 | template class Array<CanonicalForm>; |
---|
| 45 | template class List<MapPair>; |
---|
| 46 | template class ListItem<MapPair>; |
---|
| 47 | template class ListIterator<MapPair>; |
---|
| 48 | template class Matrix<CanonicalForm>; |
---|
| 49 | template class SubMatrix<CanonicalForm>; |
---|
[954622] | 50 | template class Array<REvaluation>; |
---|
[623e7c] | 51 | |
---|
[6f640e] | 52 | #ifndef NOSTREAMIO |
---|
| 53 | template ostream & operator<<(ostream &, const List<Factor<CanonicalForm> > &); |
---|
| 54 | template ostream & operator<<(ostream &, const List<Variable> &); |
---|
| 55 | #endif |
---|
| 56 | |
---|
[41bcd7] | 57 | #ifndef __MWERKS__ |
---|
[623e7c] | 58 | template List<CFFactor> Union ( const List<CFFactor>&, const List<CFFactor>& ); |
---|
[96bd24] | 59 | template int operator == ( const Factor<CanonicalForm>&, const Factor<CanonicalForm>& ); |
---|
[623e7c] | 60 | |
---|
| 61 | template CanonicalForm tmax ( const CanonicalForm&, const CanonicalForm& ); |
---|
| 62 | template CanonicalForm tmin ( const CanonicalForm&, const CanonicalForm& ); |
---|
| 63 | |
---|
[1b43cf] | 64 | template Variable tmax ( const Variable&, const Variable& ); |
---|
| 65 | template Variable tmin ( const Variable&, const Variable& ); |
---|
| 66 | |
---|
[623e7c] | 67 | template int tmax ( const int&, const int& ); |
---|
| 68 | template int tmin ( const int&, const int& ); |
---|
[1d4180] | 69 | template int tabs ( const int& ); |
---|
[623e7c] | 70 | #endif |
---|
| 71 | |
---|
| 72 | #endif |
---|
[0e1846] | 73 | // place here your own template stuff, not instantiated by factory |
---|
[623e7c] | 74 | #ifdef HAVE_LIBFAC_P |
---|
| 75 | #include <factor.h> |
---|
[dc32d42] | 76 | |
---|
| 77 | // class.h: |
---|
| 78 | template <class T> |
---|
| 79 | class Substitution { |
---|
| 80 | private: |
---|
| 81 | T _factor; |
---|
| 82 | T _exp; |
---|
| 83 | public: |
---|
| 84 | Substitution() : _factor(1), _exp(0) {} |
---|
| 85 | Substitution( const Substitution<T> & f ) : _factor(f._factor), _exp(f._exp) {} |
---|
| 86 | Substitution( const T & f, const T & e ) : _factor(f), _exp(e) {} |
---|
| 87 | Substitution( const T & f ) : _factor(f), _exp(1) {} |
---|
| 88 | ~Substitution() {} |
---|
| 89 | Substitution<T>& operator= ( const Substitution<T>& ); |
---|
| 90 | Substitution<T>& operator= ( const T& ); |
---|
| 91 | T factor() const { return _factor; } |
---|
| 92 | T exp() const { return _exp; } |
---|
[6400f5] | 93 | #ifndef NOSTREAMIO |
---|
| 94 | friend ostream & operator <<(ostream &, const Substitution<T> &); |
---|
| 95 | #endif |
---|
[dc32d42] | 96 | }; |
---|
[638c809] | 97 | template <class T> |
---|
| 98 | int operator== ( const Substitution<T>&, const Substitution<T>& ); |
---|
[dc32d42] | 99 | |
---|
| 100 | // class.cc |
---|
| 101 | template <class T> |
---|
| 102 | Substitution<T>& Substitution<T>::operator= ( const Substitution<T>& f ) |
---|
| 103 | { |
---|
| 104 | if ( this != &f ) { |
---|
[5812c69] | 105 | _factor = f._factor; |
---|
| 106 | _exp = f._exp; |
---|
[dc32d42] | 107 | } |
---|
| 108 | return *this; |
---|
| 109 | } |
---|
| 110 | |
---|
| 111 | template <class T> |
---|
| 112 | Substitution<T>& Substitution<T>::operator= ( const T & f ) |
---|
| 113 | { |
---|
| 114 | _factor = f; |
---|
| 115 | _exp = 1; |
---|
| 116 | return *this; |
---|
| 117 | } |
---|
| 118 | |
---|
[6400f5] | 119 | #ifndef NOSTREAMIO |
---|
| 120 | template <class T> |
---|
| 121 | ostream& operator<< ( ostream & os, const Substitution<T> & a ) { return os; } |
---|
| 122 | #endif |
---|
| 123 | |
---|
[dc32d42] | 124 | template <class T> |
---|
| 125 | int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 ) |
---|
| 126 | { |
---|
| 127 | return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor()); |
---|
| 128 | } |
---|
[0e1846] | 129 | |
---|
[623e7c] | 130 | template class List<int>; |
---|
| 131 | template class ListIterator<int>; |
---|
[0e1846] | 132 | |
---|
[623e7c] | 133 | template class List<IntList>; |
---|
| 134 | template class ListIterator<IntList>; |
---|
[0e1846] | 135 | |
---|
[623e7c] | 136 | template class Substitution<CanonicalForm>; |
---|
| 137 | template class Array<Variable>; |
---|
| 138 | template class Array<int>; |
---|
| 139 | typedef Substitution<CanonicalForm> SForm ; |
---|
| 140 | template class List<SForm>; |
---|
| 141 | template class ListIterator<SForm>; |
---|
| 142 | template class List<Variable>; |
---|
| 143 | template class ListIterator<Variable> ; |
---|
[0e1846] | 144 | |
---|
[41bcd7] | 145 | #ifndef __MWERKS__ |
---|
[623e7c] | 146 | template List<Variable> Union ( const List<Variable>&, const List<Variable>& ); |
---|
| 147 | template List<Variable> Difference ( const List<Variable>&, const List<Variable>& ); |
---|
[0e1846] | 148 | |
---|
[623e7c] | 149 | template List<CanonicalForm> Union ( const List<CanonicalForm>&, const List<CanonicalForm>& ); |
---|
| 150 | template List<CanonicalForm> Difference ( const List<CanonicalForm>&, const List<CanonicalForm>& ); |
---|
| 151 | #endif |
---|
[0e1846] | 152 | |
---|
| 153 | // for charsets: |
---|
[623e7c] | 154 | template class List<CFList>; |
---|
| 155 | template class ListIterator<CFList>; |
---|
[0e1846] | 156 | |
---|
[623e7c] | 157 | #endif |
---|
[0e1846] | 158 | #endif |
---|
| 159 | |
---|
| 160 | #ifdef HAVE_FGLM |
---|
| 161 | // templates for fglm: |
---|
| 162 | |
---|
[623e7c] | 163 | template class List<fglmSelem>; |
---|
| 164 | template class ListIterator<fglmSelem>; |
---|
[0e1846] | 165 | |
---|
[623e7c] | 166 | template class List<fglmDelem>; |
---|
| 167 | template class ListIterator<fglmDelem>; |
---|
[0e1846] | 168 | #endif |
---|
[7885020] | 169 | |
---|
| 170 | // ---------------------------------------------------------------------------- |
---|
| 171 | // kmatrix.cc |
---|
| 172 | // begin of file |
---|
| 173 | // Stephan Endrass, endrass@mathematik.uni-mainz.de |
---|
| 174 | // 23.7.99 |
---|
| 175 | // ---------------------------------------------------------------------------- |
---|
| 176 | |
---|
| 177 | #ifdef HAVE_SPECTRUM |
---|
| 178 | |
---|
| 179 | #ifdef KMATRIX_PRINT |
---|
| 180 | #include <iostream.h> |
---|
| 181 | #ifndef KMATRIX_IOSTREAM |
---|
| 182 | #include <stdio.h> |
---|
| 183 | #endif |
---|
| 184 | #endif |
---|
| 185 | |
---|
| 186 | #include "GMPrat.h" |
---|
| 187 | #include "kmatrix.h" |
---|
| 188 | |
---|
| 189 | template class KMatrix<Rational>; |
---|
| 190 | |
---|
| 191 | #ifdef KMATRIX_PRINT |
---|
| 192 | template ostream & operator << ( ostream&,const KMatrix<Rational>& ); |
---|
| 193 | template static void print_rational( ostream&,int,const Rational& ); |
---|
| 194 | #endif |
---|
| 195 | |
---|
| 196 | #endif /* HAVE_SPECTRUM */ |
---|
| 197 | // ---------------------------------------------------------------------------- |
---|
| 198 | // kmatrix.cc |
---|
| 199 | // end of file |
---|
| 200 | // ---------------------------------------------------------------------------- |
---|