C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
xscclass.hpp
1 /*
2 ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4)
3 **
4 ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik,
5 ** Universitaet Karlsruhe, Germany
6 ** (C) 2000-2014 Wiss. Rechnen/Softwaretechnologie
7 ** Universitaet Wuppertal, Germany
8 **
9 ** This library is free software; you can redistribute it and/or
10 ** modify it under the terms of the GNU Library General Public
11 ** License as published by the Free Software Foundation; either
12 ** version 2 of the License, or (at your option) any later version.
13 **
14 ** This library is distributed in the hope that it will be useful,
15 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 ** Library General Public License for more details.
18 **
19 ** You should have received a copy of the GNU Library General Public
20 ** License along with this library; if not, write to the Free
21 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23 
24 /* CVS $Id: xscclass.hpp,v 1.33 2014/01/30 17:23:49 cxsc Exp $ */
25 
26 #ifndef _CXSC_XSCCLASS_HPP_INCLUDED
27 #define _CXSC_XSCCLASS_HPP_INCLUDED
28 
29 #include "compiler.h"
30 
31 // #ifndef CXSC_INDEX_CHECK // 4.10.00
32 // # define CXSC_INDEX_CHECK 1
33 // #endif
34 #ifndef CXSC_INDEX_CHECK
35  #define CXSC_INDEX_CHECK 0
36 #endif
37 
38 #ifdef OLD_CXSC
39 
40 //#define index CXSC_index
41 
42 
43 namespace cxsc {
44 
45 class index // for backwards compatibility
46 {
47 private:
48  int ind;
49 public:
50  index() {}
51  index(const int i) { ind=i; }
52  int _int() const { return ind; }
53 };
54 
55 } // namespace cxsc
56 
57 //typedef class _index index;
58 
59 #endif
60 
61 #define _CXSC_INLINE
62 #ifdef _CXSC_INLINE
63 # define INLINE inline
64 # define TINLINE inline // templates in vector.inl, matrix.inl
65 # define _CXSC_INCL_INL
66 # define _CXSC_FRIEND_TPL // define friends in *vector.hpp, *matrix.hpp
67 #else
68 # define INLINE
69 # define TINLINE
70 #endif
71 
72 #undef _CXSC_CPP
73 #ifdef _CXSC_CPP
74 # undef INLINE
75 # define INLINE
76 # undef TINLINE
77 # define TINLINE inline
78 # define _CXSC_FRIEND_TPL
79 # undef _CXSC_INCL_INL
80 #endif
81 
82 
83 // wegen gcc 2.95.1 <----------------------------------------================
84 // #undef TINLINE
85 // #define TINLINE
86 
87 #include <string>
88 
89 namespace cxsc {
90 
91 using std::string; // this does the job for all files it is included
92 
93 class real; // real.hpp
94 class interval; // interval.hpp
95 class complex; // complex.hpp
96 class cinterval; // cinterva.hpp complex interval
97 
98 class l_real; // l_real.hpp staggered real
99 class l_interval; // l_interv.hpp staggered interval
100 class l_complex;
101 class l_cinterval;
102 
103 class lx_interval; // lx_interval.hpp extended staggered interval
104 class lx_real; // lx_real.hpp extended staggered real
105 class lx_cinterval; // lx_cinterval.hpp extended staggered complex interval
106 class lx_complex; // lx_complex.hpp extended staggered complex
107 
108 class dotprecision; // dot.hpp
109 class idotprecision; // idot.hpp interval dotprecision
110 class cdotprecision; // cdot.hpp complex dotprecision
111 class cidotprecision; // cidot.hpp complex interval dotprecision
112 
113 class intvector;
114 class intvector_slice;
115 class rvector;
116 class rvector_slice;
117 class ivector;
118 class ivector_slice;
119 class cvector;
120 class cvector_slice;
121 class civector;
122 class civector_slice;
123 class l_rvector;
124 class l_rvector_slice;
125 class l_ivector;
126 class l_ivector_slice;
127 
128 class intmatrix;
129 class intmatrix_slice;
130 class intmatrix_subv;
131 class rmatrix;
132 class rmatrix_slice;
133 class rmatrix_subv;
134 class imatrix;
135 class imatrix_slice;
136 class imatrix_subv;
137 class cmatrix;
138 class cmatrix_slice;
139 class cmatrix_subv;
140 class cimatrix;
141 class cimatrix_slice;
142 class cimatrix_subv;
143 class l_rmatrix;
144 class l_rmatrix_slice;
145 class l_rmatrix_subv;
146 class l_imatrix;
147 class l_imatrix_slice;
148 class l_imatrix_subv;
149 
150 class srvector;
151 class sivector;
152 class scvector;
153 class scivector;
154 class srvector_slice;
155 class sivector_slice;
156 class scvector_slice;
157 class scivector_slice;
158 
159 class srmatrix;
160 class simatrix;
161 class scmatrix;
162 class scimatrix;
163 class srmatrix_slice;
164 class simatrix_slice;
165 class scmatrix_slice;
166 class scimatrix_slice;
167 class srmatrix_subv;
168 class simatrix_subv;
169 class scmatrix_subv;
170 class scimatrix_subv;
171 
172 inline string nameof(bool) { return "bool"; }
173 inline string nameof(char) { return "char"; }
174 inline string nameof(int) { return "int"; }
175 inline string nameof(long) { return "long"; }
176 
177 inline string nameof(const float &) { return "float"; }
178 inline string nameof(const double &) { return "double"; }
179 
180 inline string nameof(const real &) { return "real"; }
181 inline string nameof(const interval &) { return "interval"; }
182 inline string nameof(const complex &) { return "complex"; }
183 inline string nameof(const cinterval &){ return "cinterval"; }
184 
185 inline string nameof(const l_real &) { return "l_real"; }
186 inline string nameof(const l_interval &) { return "l_interval"; }
187 inline string nameof(const l_complex &) { return "l_complex"; }
188 inline string nameof(const l_cinterval &) { return "l_cinterval"; }
189 
190 inline string nameof(const lx_real &) { return "lx_real"; }
191 inline string nameof(const lx_interval &) { return "lx_interval"; }
192 inline string nameof(const lx_cinterval &){ return "lx_cinterval"; }
193 
194 inline string nameof(const dotprecision &) { return "dotprecision"; }
195 inline string nameof(const idotprecision &) { return "idotprecision"; }
196 inline string nameof(const cdotprecision &) { return "cdotprecision"; }
197 inline string nameof(const cidotprecision &) { return "cidotprecision"; }
198 
199 inline string nameof(const intvector &) { return "intvector"; }
200 inline string nameof(const intvector_slice &) { return "intvector_slice"; }
201 inline string nameof(const rvector &) { return "rvector"; }
202 inline string nameof(const rvector_slice &) { return "rvector_slice"; }
203 inline string nameof(const ivector &) { return "ivector"; }
204 inline string nameof(const ivector_slice &) { return "ivector_slice"; }
205 inline string nameof(const cvector &) { return "cvector"; }
206 inline string nameof(const cvector_slice &) { return "cvector_slice"; }
207 inline string nameof(const civector &) { return "civector"; }
208 inline string nameof(const civector_slice &) { return "civector_slice"; }
209 inline string nameof(const l_rvector &) { return "l_rvector"; }
210 inline string nameof(const l_rvector_slice &) { return "l_rvector_slice"; }
211 inline string nameof(const l_ivector &) { return "l_ivector"; }
212 inline string nameof(const l_ivector_slice &) { return "l_ivector_slice"; }
213 
214 inline string nameof(const intmatrix &) { return "intmatrix"; }
215 inline string nameof(const intmatrix_slice &) { return "intmatrix_slice"; }
216 inline string nameof(const rmatrix &) { return "rmatrix"; }
217 inline string nameof(const rmatrix_slice &) { return "rmatrix_slice"; }
218 inline string nameof(const rmatrix_subv &) { return "rmatrix_subv"; }
219 inline string nameof(const imatrix &) { return "imatrix"; }
220 inline string nameof(const imatrix_slice &) { return "imatrix_slice"; }
221 inline string nameof(const imatrix_subv &) { return "imatrix_subv"; }
222 inline string nameof(const cmatrix &) { return "cmatrix"; }
223 inline string nameof(const cmatrix_slice &) { return "cmatrix_slice"; }
224 inline string nameof(const cmatrix_subv &) { return "cmatrix_subv"; }
225 inline string nameof(const cimatrix &) { return "cimatrix"; }
226 inline string nameof(const cimatrix_slice &) { return "cimatrix_slice"; }
227 inline string nameof(const cimatrix_subv &) { return "cimatrix_subv"; }
228 inline string nameof(const l_rmatrix &) { return "l_rmatrix"; }
229 inline string nameof(const l_rmatrix_slice &) { return "l_rmatrix_slice"; }
230 inline string nameof(const l_rmatrix_subv &) { return "l_rmatrix_subv"; }
231 inline string nameof(const l_imatrix &) { return "l_imatrix"; }
232 inline string nameof(const l_imatrix_slice &) { return "l_imatrix_slice"; }
233 inline string nameof(const l_imatrix_subv &) { return "l_imatrix_subv"; }
234 
235 inline string nameof(const srvector& ) { return "srvector"; }
236 inline string nameof(const sivector& ) { return "sivector"; }
237 inline string nameof(const scvector& ) { return "scvector"; }
238 inline string nameof(const scivector& ) { return "scivector"; }
239 inline string nameof(const srvector_slice& ) { return "srvector_slice"; }
240 inline string nameof(const sivector_slice& ) { return "sivector_slice"; }
241 inline string nameof(const scvector_slice& ) { return "scvector_slice"; }
242 inline string nameof(const scivector_slice& ) { return "scivector_slice"; }
243 
244 inline string nameof(const srmatrix& ) { return "srmatrix"; }
245 inline string nameof(const simatrix& ) { return "simatrix"; }
246 inline string nameof(const scmatrix& ) { return "scmatrix"; }
247 inline string nameof(const scimatrix& ) { return "scimatrix"; }
248 inline string nameof(const srmatrix_slice& ) { return "srmatrix_slice"; }
249 inline string nameof(const simatrix_slice& ) { return "simatrix_slice"; }
250 inline string nameof(const scmatrix_slice& ) { return "scmatrix_slice"; }
251 inline string nameof(const scimatrix_slice& ) { return "scimatrix_slice"; }
252 inline string nameof(const srmatrix_subv& ) { return "srmatrix_subv"; }
253 inline string nameof(const simatrix_subv& ) { return "simatrix_subv"; }
254 inline string nameof(const scmatrix_subv& ) { return "scmatrix_subv"; }
255 inline string nameof(const scimatrix_subv& ) { return "scimatrix_subv"; }
256 } // namespace cxsc
257 
258 #endif // _CXSC_XSCCLASS_HPP_INCLUDED
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29