Changeset e3198f in git
- Timestamp:
- Feb 17, 2012, 6:56:06 PM (11 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
- Children:
- db349803eb432fe57368fae5b8e4ab74d05fb613
- Parents:
- 26acab557e4ad73e2c8ba02fa1ad998773365fff
- git-author:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-02-17 18:56:06+01:00
- git-committer:
- Hans Schoenemann <hannes@mathematik.uni-kl.de>2012-02-17 18:56:56+01:00
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/claptmpl.cc
r26acab5 re3198f 16 16 #include <factory/templates/ftmpl_list.cc> 17 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 NOSTREAMIO43 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 #endif48 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 template CanonicalForm prod ( const List<CanonicalForm> & );63 64 // place here your own template stuff, not instantiated by factory65 // libfac:66 #ifdef HAVE_LIBFAC67 # include <factory/libfac/libfac.h>68 #endif69 70 // class.h:71 template <class T>72 class Substitution73 {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 NOSTREAMIO88 //friend OSTREAM & operator <<<>(OSTREAM &, Substitution<T> &);89 void print ( OSTREAM& s ) const90 {91 s << "(" << factor() << ")^" << exp();92 }93 #endif94 };95 template <class T>96 int operator== ( const Substitution<T>&, const Substitution<T>& );97 98 // class.cc99 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 NOSTREAMIO118 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 #endif129 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 #ifdef HAVE_LIBFAC140 template class List<IntList>;141 template class ListIterator<IntList>;142 #endif143 144 template class Substitution<CanonicalForm>;145 template class Array<Variable>;146 template class Array<int>;147 typedef Substitution<CanonicalForm> SForm ;148 template class List<SForm>;149 template class ListIterator<SForm>;150 template class List<Variable>;151 template class ListIterator<Variable> ;152 153 template List<Variable> Union ( const List<Variable>&, const List<Variable>& );154 template List<Variable> Difference ( const List<Variable>&, const List<Variable>& );155 156 template List<CanonicalForm> Union ( const List<CanonicalForm>&, const List<CanonicalForm>& );157 template List<CanonicalForm> Difference ( const List<CanonicalForm>&, const List<CanonicalForm>& );158 159 // for charsets:160 template class ListIterator<CFList>;161 18 162 19 // templates for fglm: -
factory/libfac/factor/tmpl_inst.cc
r26acab5 re3198f 1 1 //////////////////////////////////////////////////////////// 2 2 // emacs edit mode for this file is -*- C++ -*- 3 // $Id$4 3 //////////////////////////////////////////////////////////// 5 4
Note: See TracChangeset
for help on using the changeset viewer.