00001 /*************************************************************************** 00002 numerictraits.h - description 00003 ------------------- 00004 begin : Wed May 10 2000 00005 copyright : (C) 2000 by Michael Peeters 00006 email : Michael.Peeters@vub.ac.be 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef NUMERICTRAITS_H 00019 #define NUMERICTRAITS_H 00020 00021 #include "numerictypes.h" 00022 00023 namespace MODEL 00024 { 00025 00026 // Forward definitions 00027 template <typename numT, integer dims> 00028 class NumericTraits; 00029 00030 //Previously: <integer dims, class NT> 00031 template<integer dims, typename nelem, class NT> 00032 class NumVector; 00033 00034 // Previously template <integer dims, class NT> 00035 template<integer dims, typename nelem, class NT> 00036 class VectorFunction; 00037 00038 00039 template <integer dims, class NT> 00040 class ScalarFunction; 00041 00045 template <typename numT, integer dims> 00046 class NumericTraits 00047 { 00048 public: 00050 typedef numT number; 00052 typedef NumVector< dims , numT, NumericTraits > vect; 00054 typedef NumVector< dims , vect, NumericTraits<vect,dims> > matrix; 00056 typedef NumVector< dims , vect, NumericTraits<matrix,dims> > tensor; 00057 00059 typedef VectorFunction< dims , numT, NumericTraits > vf; 00061 typedef ScalarFunction< dims , NumericTraits<number,dims> > sf; 00062 00064 static const integer N=dims; 00065 }; 00066 00067 00070 /* 00071 template <typename numT, integer dims> 00072 class NumericTraits<std::complex<numT>,dims> 00073 { 00074 public: 00075 typedef numT number; 00076 typedef NumVector< dims , NumericTraits > vect; 00077 typedef NumVector< dims , NumericTraits<vect,dims> > matrix; 00078 }; 00079 */ 00080 00081 } 00082 #endif 00083 00084 /********************************************************************* 00085 $Id: numerictraits.h,v 1.1 2001/05/22 10:54:55 mpeeters Exp $ 00086 ********************************************************************** 00087 00088 $Log: numerictraits.h,v $ 00089 Revision 1.1 2001/05/22 10:54:55 mpeeters 00090 Moved sources and headers for libModel to model/ subdirectory, in an attempt to rationalize the source tree. This should make things "netter". 00091 00092 Revision 1.3 2001/05/21 11:53:16 mpeeters 00093 Removed Makefile.in, which is automatically generated anyway. 00094 00095 Revision 1.2 2000/09/15 10:26:31 mpeeters 00096 Cleaned out header and added CVS tails to files, removed superfuous 00097 @author comments, inserted dates 00098 00099 *********************************************************************/
More Info? Michael Peeters. Also, check our research website: www.alna.vub.ac.be
Last update: June 2002.