C-XSC - A C++ Class Library for Extended Scientific Computing
2.5.4
|
00001 /* 00002 ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4) 00003 ** 00004 ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik, 00005 ** Universitaet Karlsruhe, Germany 00006 ** (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie 00007 ** Universitaet Wuppertal, Germany 00008 ** 00009 ** This library is free software; you can redistribute it and/or 00010 ** modify it under the terms of the GNU Library General Public 00011 ** License as published by the Free Software Foundation; either 00012 ** version 2 of the License, or (at your option) any later version. 00013 ** 00014 ** This library is distributed in the hope that it will be useful, 00015 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 ** Library General Public License for more details. 00018 ** 00019 ** You should have received a copy of the GNU Library General Public 00020 ** License along with this library; if not, write to the Free 00021 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 */ 00023 00024 /* CVS $Id: xscclass.hpp,v 1.33 2014/01/30 17:23:49 cxsc Exp $ */ 00025 00026 #ifndef _CXSC_XSCCLASS_HPP_INCLUDED 00027 #define _CXSC_XSCCLASS_HPP_INCLUDED 00028 00029 #include "compiler.h" 00030 00031 // #ifndef CXSC_INDEX_CHECK // 4.10.00 00032 // # define CXSC_INDEX_CHECK 1 00033 // #endif 00034 #ifndef CXSC_INDEX_CHECK 00035 #define CXSC_INDEX_CHECK 0 00036 #endif 00037 00038 #ifdef OLD_CXSC 00039 00040 //#define index CXSC_index 00041 00042 00043 namespace cxsc { 00044 00045 class index // for backwards compatibility 00046 { 00047 private: 00048 int ind; 00049 public: 00050 index() {} 00051 index(const int i) { ind=i; } 00052 int _int() const { return ind; } 00053 }; 00054 00055 } // namespace cxsc 00056 00057 //typedef class _index index; 00058 00059 #endif 00060 00061 #define _CXSC_INLINE 00062 #ifdef _CXSC_INLINE 00063 # define INLINE inline 00064 # define TINLINE inline // templates in vector.inl, matrix.inl 00065 # define _CXSC_INCL_INL 00066 # define _CXSC_FRIEND_TPL // define friends in *vector.hpp, *matrix.hpp 00067 #else 00068 # define INLINE 00069 # define TINLINE 00070 #endif 00071 00072 #undef _CXSC_CPP 00073 #ifdef _CXSC_CPP 00074 # undef INLINE 00075 # define INLINE 00076 # undef TINLINE 00077 # define TINLINE inline 00078 # define _CXSC_FRIEND_TPL 00079 # undef _CXSC_INCL_INL 00080 #endif 00081 00082 00083 // wegen gcc 2.95.1 <----------------------------------------================ 00084 // #undef TINLINE 00085 // #define TINLINE 00086 00087 #include <string> 00088 00089 namespace cxsc { 00090 00091 using std::string; // this does the job for all files it is included 00092 00093 class real; // real.hpp 00094 class interval; // interval.hpp 00095 class complex; // complex.hpp 00096 class cinterval; // cinterva.hpp complex interval 00097 00098 class l_real; // l_real.hpp staggered real 00099 class l_interval; // l_interv.hpp staggered interval 00100 class l_complex; 00101 class l_cinterval; 00102 00103 class lx_interval; // lx_interval.hpp extended staggered interval 00104 class lx_real; // lx_real.hpp extended staggered real 00105 class lx_cinterval; // lx_cinterval.hpp extended staggered complex interval 00106 class lx_complex; // lx_complex.hpp extended staggered complex 00107 00108 class dotprecision; // dot.hpp 00109 class idotprecision; // idot.hpp interval dotprecision 00110 class cdotprecision; // cdot.hpp complex dotprecision 00111 class cidotprecision; // cidot.hpp complex interval dotprecision 00112 00113 class intvector; 00114 class intvector_slice; 00115 class rvector; 00116 class rvector_slice; 00117 class ivector; 00118 class ivector_slice; 00119 class cvector; 00120 class cvector_slice; 00121 class civector; 00122 class civector_slice; 00123 class l_rvector; 00124 class l_rvector_slice; 00125 class l_ivector; 00126 class l_ivector_slice; 00127 00128 class intmatrix; 00129 class intmatrix_slice; 00130 class intmatrix_subv; 00131 class rmatrix; 00132 class rmatrix_slice; 00133 class rmatrix_subv; 00134 class imatrix; 00135 class imatrix_slice; 00136 class imatrix_subv; 00137 class cmatrix; 00138 class cmatrix_slice; 00139 class cmatrix_subv; 00140 class cimatrix; 00141 class cimatrix_slice; 00142 class cimatrix_subv; 00143 class l_rmatrix; 00144 class l_rmatrix_slice; 00145 class l_rmatrix_subv; 00146 class l_imatrix; 00147 class l_imatrix_slice; 00148 class l_imatrix_subv; 00149 00150 class srvector; 00151 class sivector; 00152 class scvector; 00153 class scivector; 00154 class srvector_slice; 00155 class sivector_slice; 00156 class scvector_slice; 00157 class scivector_slice; 00158 00159 class srmatrix; 00160 class simatrix; 00161 class scmatrix; 00162 class scimatrix; 00163 class srmatrix_slice; 00164 class simatrix_slice; 00165 class scmatrix_slice; 00166 class scimatrix_slice; 00167 class srmatrix_subv; 00168 class simatrix_subv; 00169 class scmatrix_subv; 00170 class scimatrix_subv; 00171 00172 inline string nameof(bool) { return "bool"; } 00173 inline string nameof(char) { return "char"; } 00174 inline string nameof(int) { return "int"; } 00175 inline string nameof(long) { return "long"; } 00176 00177 inline string nameof(const float &) { return "float"; } 00178 inline string nameof(const double &) { return "double"; } 00179 00180 inline string nameof(const real &) { return "real"; } 00181 inline string nameof(const interval &) { return "interval"; } 00182 inline string nameof(const complex &) { return "complex"; } 00183 inline string nameof(const cinterval &){ return "cinterval"; } 00184 00185 inline string nameof(const l_real &) { return "l_real"; } 00186 inline string nameof(const l_interval &) { return "l_interval"; } 00187 inline string nameof(const l_complex &) { return "l_complex"; } 00188 inline string nameof(const l_cinterval &) { return "l_cinterval"; } 00189 00190 inline string nameof(const lx_real &) { return "lx_real"; } 00191 inline string nameof(const lx_interval &) { return "lx_interval"; } 00192 inline string nameof(const lx_cinterval &){ return "lx_cinterval"; } 00193 00194 inline string nameof(const dotprecision &) { return "dotprecision"; } 00195 inline string nameof(const idotprecision &) { return "idotprecision"; } 00196 inline string nameof(const cdotprecision &) { return "cdotprecision"; } 00197 inline string nameof(const cidotprecision &) { return "cidotprecision"; } 00198 00199 inline string nameof(const intvector &) { return "intvector"; } 00200 inline string nameof(const intvector_slice &) { return "intvector_slice"; } 00201 inline string nameof(const rvector &) { return "rvector"; } 00202 inline string nameof(const rvector_slice &) { return "rvector_slice"; } 00203 inline string nameof(const ivector &) { return "ivector"; } 00204 inline string nameof(const ivector_slice &) { return "ivector_slice"; } 00205 inline string nameof(const cvector &) { return "cvector"; } 00206 inline string nameof(const cvector_slice &) { return "cvector_slice"; } 00207 inline string nameof(const civector &) { return "civector"; } 00208 inline string nameof(const civector_slice &) { return "civector_slice"; } 00209 inline string nameof(const l_rvector &) { return "l_rvector"; } 00210 inline string nameof(const l_rvector_slice &) { return "l_rvector_slice"; } 00211 inline string nameof(const l_ivector &) { return "l_ivector"; } 00212 inline string nameof(const l_ivector_slice &) { return "l_ivector_slice"; } 00213 00214 inline string nameof(const intmatrix &) { return "intmatrix"; } 00215 inline string nameof(const intmatrix_slice &) { return "intmatrix_slice"; } 00216 inline string nameof(const rmatrix &) { return "rmatrix"; } 00217 inline string nameof(const rmatrix_slice &) { return "rmatrix_slice"; } 00218 inline string nameof(const rmatrix_subv &) { return "rmatrix_subv"; } 00219 inline string nameof(const imatrix &) { return "imatrix"; } 00220 inline string nameof(const imatrix_slice &) { return "imatrix_slice"; } 00221 inline string nameof(const imatrix_subv &) { return "imatrix_subv"; } 00222 inline string nameof(const cmatrix &) { return "cmatrix"; } 00223 inline string nameof(const cmatrix_slice &) { return "cmatrix_slice"; } 00224 inline string nameof(const cmatrix_subv &) { return "cmatrix_subv"; } 00225 inline string nameof(const cimatrix &) { return "cimatrix"; } 00226 inline string nameof(const cimatrix_slice &) { return "cimatrix_slice"; } 00227 inline string nameof(const cimatrix_subv &) { return "cimatrix_subv"; } 00228 inline string nameof(const l_rmatrix &) { return "l_rmatrix"; } 00229 inline string nameof(const l_rmatrix_slice &) { return "l_rmatrix_slice"; } 00230 inline string nameof(const l_rmatrix_subv &) { return "l_rmatrix_subv"; } 00231 inline string nameof(const l_imatrix &) { return "l_imatrix"; } 00232 inline string nameof(const l_imatrix_slice &) { return "l_imatrix_slice"; } 00233 inline string nameof(const l_imatrix_subv &) { return "l_imatrix_subv"; } 00234 00235 inline string nameof(const srvector& ) { return "srvector"; } 00236 inline string nameof(const sivector& ) { return "sivector"; } 00237 inline string nameof(const scvector& ) { return "scvector"; } 00238 inline string nameof(const scivector& ) { return "scivector"; } 00239 inline string nameof(const srvector_slice& ) { return "srvector_slice"; } 00240 inline string nameof(const sivector_slice& ) { return "sivector_slice"; } 00241 inline string nameof(const scvector_slice& ) { return "scvector_slice"; } 00242 inline string nameof(const scivector_slice& ) { return "scivector_slice"; } 00243 00244 inline string nameof(const srmatrix& ) { return "srmatrix"; } 00245 inline string nameof(const simatrix& ) { return "simatrix"; } 00246 inline string nameof(const scmatrix& ) { return "scmatrix"; } 00247 inline string nameof(const scimatrix& ) { return "scimatrix"; } 00248 inline string nameof(const srmatrix_slice& ) { return "srmatrix_slice"; } 00249 inline string nameof(const simatrix_slice& ) { return "simatrix_slice"; } 00250 inline string nameof(const scmatrix_slice& ) { return "scmatrix_slice"; } 00251 inline string nameof(const scimatrix_slice& ) { return "scimatrix_slice"; } 00252 inline string nameof(const srmatrix_subv& ) { return "srmatrix_subv"; } 00253 inline string nameof(const simatrix_subv& ) { return "simatrix_subv"; } 00254 inline string nameof(const scmatrix_subv& ) { return "scmatrix_subv"; } 00255 inline string nameof(const scimatrix_subv& ) { return "scimatrix_subv"; } 00256 } // namespace cxsc 00257 00258 #endif // _CXSC_XSCCLASS_HPP_INCLUDED