[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323
Bernhard R. Link
brlink at debian.org
Tue Apr 24 15:53:18 UTC 2012
The following commit has been merged in the cleanedupstream branch:
commit 1d1841b2fee78c97f391fdf7dd35a876c2ed15f9
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date: Fri Feb 17 18:31:29 2012 +0100
chg: moved instantiation of templates to factory/libfac
diff --git a/Singular/claptmpl.cc b/Singular/claptmpl.cc
index ba70d9e..dd4d92f 100644
--- a/Singular/claptmpl.cc
+++ b/Singular/claptmpl.cc
@@ -15,146 +15,6 @@
#include <factory/factory.h>
#include <factory/templates/ftmpl_list.cc>
#include <kernel/fglm.h>
-
- #include <factory/templates/ftmpl_array.cc>
- #include <factory/templates/ftmpl_factor.cc>
- #include <factory/templates/ftmpl_functions.h>
- #include <factory/templates/ftmpl_matrix.cc>
-
- template class Factor<CanonicalForm>;
- template class List<CFFactor>;
- template class ListItem<CFFactor>;
- template class ListItem<CanonicalForm>;
- template class ListIterator<CFFactor>;
- template class List<CanonicalForm>;
- template class List<List<CanonicalForm> >;
- template class ListIterator<CanonicalForm>;
- template class Array<CanonicalForm>;
- template class List<MapPair>;
- template class ListItem<MapPair>;
- template class ListIterator<MapPair>;
- template class Matrix<CanonicalForm>;
- template class SubMatrix<CanonicalForm>;
- template class Array<REvaluation>;
- template bool find ( const List<CanonicalForm> &, const CanonicalForm&);
-
- //template class vector<poly>;
- #ifndef NOSTREAMIO
- template OSTREAM & operator<<(OSTREAM &, const List<Factor<CanonicalForm> > &);
- template OSTREAM & operator<<(OSTREAM &, const List<List<CanonicalForm> > &);
- template OSTREAM & operator<<(OSTREAM &, const List<Variable> &);
- template OSTREAM & operator<<(OSTREAM &, const Matrix<Variable> &);
- #endif
-
- template List<CFFactor> Union ( const List<CFFactor>&, const List<CFFactor>& );
- template int operator == ( const Factor<CanonicalForm>&, const Factor<CanonicalForm>& );
-
- template CanonicalForm tmax ( const CanonicalForm&, const CanonicalForm& );
- template CanonicalForm tmin ( const CanonicalForm&, const CanonicalForm& );
-
- template Variable tmax ( const Variable&, const Variable& );
- template Variable tmin ( const Variable&, const Variable& );
-
- template int tmax ( const int&, const int& );
- template int tmin ( const int&, const int& );
- template int tabs ( const int& );
-
- template CanonicalForm prod ( const List<CanonicalForm> & );
-
-// place here your own template stuff, not instantiated by factory
- // libfac:
-#include <libfac/factor.h>
-
-// class.h:
-template <class T>
-class Substitution
-{
-private:
- T _factor;
- T _exp;
-public:
- Substitution() : _factor(1), _exp(0) {}
- Substitution( const Substitution<T> & f ) : _factor(f._factor), _exp(f._exp) {}
- Substitution( const T & f, const T & e ) : _factor(f), _exp(e) {}
- Substitution( const T & f ) : _factor(f), _exp(1) {}
- ~Substitution() {}
- Substitution<T>& operator= ( const Substitution<T>& );
- Substitution<T>& operator= ( const T& );
- T factor() const { return _factor; }
- T exp() const { return _exp; }
-#ifndef NOSTREAMIO
- //friend OSTREAM & operator <<<>(OSTREAM &, Substitution<T> &);
- void print ( OSTREAM& s ) const
- {
- s << "(" << factor() << ")^" << exp();
- }
-#endif
-};
-template <class T>
-int operator== ( const Substitution<T>&, const Substitution<T>& );
-
-// class.cc
-template <class T>
-Substitution<T>& Substitution<T>::operator= ( const Substitution<T>& f )
-{
- if ( this != &f ) {
- _factor = f._factor;
- _exp = f._exp;
- }
- return *this;
-}
-
-template <class T>
-Substitution<T>& Substitution<T>::operator= ( const T & f )
-{
- _factor = f;
- _exp = 1;
- return *this;
-}
-
-#ifndef NOSTREAMIO
-template <class T>
-OSTREAM & operator <<(OSTREAM & os, Substitution<T> &a)
-{
- a.print(os);
- return os;
-}
-template OSTREAM & operator <<(OSTREAM &, Substitution<CanonicalForm> &);
-template OSTREAM & operator <<(OSTREAM &, const List<CanonicalForm> &);
-template OSTREAM & operator <<(OSTREAM &, const Array<CanonicalForm> &);
-template OSTREAM & operator<<(OSTREAM &, const List<Substitution<CanonicalForm> > &);
-#endif
-
-template <class T>
-int operator== ( const Substitution<T> &f1, const Substitution<T> &f2 )
-{
- return (f1.exp() == f2.exp()) && (f1.factor() == f2.factor());
-}
-
- template class List<int>;
- template class ListIterator<int>;
-
- template class List<IntList>;
- template class ListIterator<IntList>;
-
- template class Substitution<CanonicalForm>;
- template class Array<Variable>;
- template class Array<int>;
- typedef Substitution<CanonicalForm> SForm ;
- template class List<SForm>;
- template class ListIterator<SForm>;
- template class List<Variable>;
- template class ListIterator<Variable> ;
-
- template List<Variable> Union ( const List<Variable>&, const List<Variable>& );
- template List<Variable> Difference ( const List<Variable>&, const List<Variable>& );
-
- template List<CanonicalForm> Union ( const List<CanonicalForm>&, const List<CanonicalForm>& );
- template List<CanonicalForm> Difference ( const List<CanonicalForm>&, const List<CanonicalForm>& );
-
-// for charsets:
- template class ListIterator<CFList>;
-
// templates for fglm:
template class List<fglmSelem>;
diff --git a/libfac/Makefile.in b/libfac/Makefile.in
index c0ca230..3e026fe 100644
--- a/libfac/Makefile.in
+++ b/libfac/Makefile.in
@@ -1,4 +1,3 @@
-# $Id$
#################################################
SHELL = /bin/sh
RM = -rm -f
@@ -132,8 +131,8 @@ libfac.a: $(OPTFACTOROBJ) $(OPTCHARSETOBJ)
$(AR) ${LIBFACNAME}.a $(OPTFACTOROBJ) $(OPTCHARSETOBJ)
$(RANLIB) ${LIBFACNAME}.a
-libsingfac.a: $(OPTFACTOROBJ1) $(OPTCHARSETOBJ)
- $(AR) ${SINGLIBFACNAME}.a $(OPTFACTOROBJ1) $(OPTCHARSETOBJ)
+libsingfac.a: $(OPTFACTOROBJ) $(OPTCHARSETOBJ)
+ $(AR) ${SINGLIBFACNAME}.a $(OPTFACTOROBJ) $(OPTCHARSETOBJ)
$(RANLIB) ${SINGLIBFACNAME}.a
libsingfac_g.a: $(DEBOBJ)
diff --git a/libfac/factor/tmpl_inst.cc b/libfac/factor/tmpl_inst.cc
index 5dc08a4..1445218 100644
--- a/libfac/factor/tmpl_inst.cc
+++ b/libfac/factor/tmpl_inst.cc
@@ -12,38 +12,39 @@
#include <factory.h>
-template class Factor<CanonicalForm>;
-template class List<CFFactor>;
-template class ListIterator<CFFactor>;
-template class List<CanonicalForm>;
-template class ListIterator<CanonicalForm>;
-template class Array<CanonicalForm>;
-template class List<MapPair>;
-template class ListIterator<MapPair>;
-template class Matrix<CanonicalForm>;
-template class SubMatrix<CanonicalForm>;
+// already in factory/ftmpl_inst.cc:
+//template class Factor<CanonicalForm>;
+//template class List<CFFactor>;
+//template class ListIterator<CFFactor>;
+//template class List<CanonicalForm>;
+//template class ListIterator<CanonicalForm>;
+//template class Array<CanonicalForm>;
+//template class List<MapPair>;
+//template class ListIterator<MapPair>;
+//template class Matrix<CanonicalForm>;
+//template class SubMatrix<CanonicalForm>;
#ifndef NOSTREAMIO
-template OSTREAM & operator << ( OSTREAM &, const List<CanonicalForm> & );
-template OSTREAM & operator << ( OSTREAM &, const List<CFFactor> & );
-template OSTREAM & operator << ( OSTREAM &, const List<MapPair> & );
-template OSTREAM & operator << ( OSTREAM &, const Array<CanonicalForm> & );
-template OSTREAM & operator << ( OSTREAM &, const Factor<CanonicalForm> & );
+//template OSTREAM & operator << ( OSTREAM &, const List<CanonicalForm> & );
+//template OSTREAM & operator << ( OSTREAM &, const List<CFFactor> & );
+//template OSTREAM & operator << ( OSTREAM &, const List<MapPair> & );
+//template OSTREAM & operator << ( OSTREAM &, const Array<CanonicalForm> & );
+//template OSTREAM & operator << ( OSTREAM &, const Factor<CanonicalForm> & );
//template OSTREAM & operator << ( OSTREAM &, const Matrix<CanonicalForm> & );
#endif
-template List<CFFactor> Union ( const List<CFFactor>&, const List<CFFactor>& );
+//template List<CFFactor> Union ( const List<CFFactor>&, const List<CFFactor>& );
/*
template CanonicalForm crossprod ( const Array<CanonicalForm>&, const Array<CanonicalForm>& );
template CanonicalForm prod ( const Array<CanonicalForm>& );
*/
-template CanonicalForm tmax ( const CanonicalForm&, const CanonicalForm& );
-template CanonicalForm tmin ( const CanonicalForm&, const CanonicalForm& );
+//template CanonicalForm tmax ( const CanonicalForm&, const CanonicalForm& );
+//template CanonicalForm tmin ( const CanonicalForm&, const CanonicalForm& );
-template int tmax ( const int&, const int& );
-template int tmin ( const int&, const int& );
+//template int tmax ( const int&, const int& );
+//template int tmin ( const int&, const int& );
// place here your own template stuff, not instantiated by factory
#include "tmpl_inst.h"
--
an open source computer algebra system
More information about the debian-science-commits
mailing list