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
43namespace cxsc {
44
45class index // for backwards compatibility
46{
47private:
48 int ind;
49public:
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
89namespace cxsc {
90
91using std::string; // this does the job for all files it is included
92
93class real; // real.hpp
94class interval; // interval.hpp
95class complex; // complex.hpp
96class cinterval; // cinterva.hpp complex interval
97
98class l_real; // l_real.hpp staggered real
99class l_interval; // l_interv.hpp staggered interval
100class l_complex;
101class l_cinterval;
102
103class lx_interval; // lx_interval.hpp extended staggered interval
104class lx_real; // lx_real.hpp extended staggered real
105class lx_cinterval; // lx_cinterval.hpp extended staggered complex interval
106class lx_complex; // lx_complex.hpp extended staggered complex
107
108class dotprecision; // dot.hpp
109class idotprecision; // idot.hpp interval dotprecision
110class cdotprecision; // cdot.hpp complex dotprecision
111class cidotprecision; // cidot.hpp complex interval dotprecision
112
113class intvector;
114class intvector_slice;
115class rvector;
116class rvector_slice;
117class ivector;
118class ivector_slice;
119class cvector;
120class cvector_slice;
121class civector;
122class civector_slice;
123class l_rvector;
124class l_rvector_slice;
125class l_ivector;
126class l_ivector_slice;
127
128class intmatrix;
129class intmatrix_slice;
130class intmatrix_subv;
131class rmatrix;
132class rmatrix_slice;
133class rmatrix_subv;
134class imatrix;
135class imatrix_slice;
136class imatrix_subv;
137class cmatrix;
138class cmatrix_slice;
139class cmatrix_subv;
140class cimatrix;
141class cimatrix_slice;
142class cimatrix_subv;
143class l_rmatrix;
144class l_rmatrix_slice;
145class l_rmatrix_subv;
146class l_imatrix;
147class l_imatrix_slice;
148class l_imatrix_subv;
149
150class srvector;
151class sivector;
152class scvector;
153class scivector;
154class srvector_slice;
155class sivector_slice;
156class scvector_slice;
157class scivector_slice;
158
159class srmatrix;
160class simatrix;
161class scmatrix;
162class scimatrix;
163class srmatrix_slice;
164class simatrix_slice;
165class scmatrix_slice;
166class scimatrix_slice;
167class srmatrix_subv;
168class simatrix_subv;
169class scmatrix_subv;
170class scimatrix_subv;
171
172inline string nameof(bool) { return "bool"; }
173inline string nameof(char) { return "char"; }
174inline string nameof(int) { return "int"; }
175inline string nameof(long) { return "long"; }
176
177inline string nameof(const float &) { return "float"; }
178inline string nameof(const double &) { return "double"; }
179
180inline string nameof(const real &) { return "real"; }
181inline string nameof(const interval &) { return "interval"; }
182inline string nameof(const complex &) { return "complex"; }
183inline string nameof(const cinterval &){ return "cinterval"; }
184
185inline string nameof(const l_real &) { return "l_real"; }
186inline string nameof(const l_interval &) { return "l_interval"; }
187inline string nameof(const l_complex &) { return "l_complex"; }
188inline string nameof(const l_cinterval &) { return "l_cinterval"; }
189
190inline string nameof(const lx_real &) { return "lx_real"; }
191inline string nameof(const lx_interval &) { return "lx_interval"; }
192inline string nameof(const lx_cinterval &){ return "lx_cinterval"; }
193
194inline string nameof(const dotprecision &) { return "dotprecision"; }
195inline string nameof(const idotprecision &) { return "idotprecision"; }
196inline string nameof(const cdotprecision &) { return "cdotprecision"; }
197inline string nameof(const cidotprecision &) { return "cidotprecision"; }
198
199inline string nameof(const intvector &) { return "intvector"; }
200inline string nameof(const intvector_slice &) { return "intvector_slice"; }
201inline string nameof(const rvector &) { return "rvector"; }
202inline string nameof(const rvector_slice &) { return "rvector_slice"; }
203inline string nameof(const ivector &) { return "ivector"; }
204inline string nameof(const ivector_slice &) { return "ivector_slice"; }
205inline string nameof(const cvector &) { return "cvector"; }
206inline string nameof(const cvector_slice &) { return "cvector_slice"; }
207inline string nameof(const civector &) { return "civector"; }
208inline string nameof(const civector_slice &) { return "civector_slice"; }
209inline string nameof(const l_rvector &) { return "l_rvector"; }
210inline string nameof(const l_rvector_slice &) { return "l_rvector_slice"; }
211inline string nameof(const l_ivector &) { return "l_ivector"; }
212inline string nameof(const l_ivector_slice &) { return "l_ivector_slice"; }
213
214inline string nameof(const intmatrix &) { return "intmatrix"; }
215inline string nameof(const intmatrix_slice &) { return "intmatrix_slice"; }
216inline string nameof(const rmatrix &) { return "rmatrix"; }
217inline string nameof(const rmatrix_slice &) { return "rmatrix_slice"; }
218inline string nameof(const rmatrix_subv &) { return "rmatrix_subv"; }
219inline string nameof(const imatrix &) { return "imatrix"; }
220inline string nameof(const imatrix_slice &) { return "imatrix_slice"; }
221inline string nameof(const imatrix_subv &) { return "imatrix_subv"; }
222inline string nameof(const cmatrix &) { return "cmatrix"; }
223inline string nameof(const cmatrix_slice &) { return "cmatrix_slice"; }
224inline string nameof(const cmatrix_subv &) { return "cmatrix_subv"; }
225inline string nameof(const cimatrix &) { return "cimatrix"; }
226inline string nameof(const cimatrix_slice &) { return "cimatrix_slice"; }
227inline string nameof(const cimatrix_subv &) { return "cimatrix_subv"; }
228inline string nameof(const l_rmatrix &) { return "l_rmatrix"; }
229inline string nameof(const l_rmatrix_slice &) { return "l_rmatrix_slice"; }
230inline string nameof(const l_rmatrix_subv &) { return "l_rmatrix_subv"; }
231inline string nameof(const l_imatrix &) { return "l_imatrix"; }
232inline string nameof(const l_imatrix_slice &) { return "l_imatrix_slice"; }
233inline string nameof(const l_imatrix_subv &) { return "l_imatrix_subv"; }
234
235inline string nameof(const srvector& ) { return "srvector"; }
236inline string nameof(const sivector& ) { return "sivector"; }
237inline string nameof(const scvector& ) { return "scvector"; }
238inline string nameof(const scivector& ) { return "scivector"; }
239inline string nameof(const srvector_slice& ) { return "srvector_slice"; }
240inline string nameof(const sivector_slice& ) { return "sivector_slice"; }
241inline string nameof(const scvector_slice& ) { return "scvector_slice"; }
242inline string nameof(const scivector_slice& ) { return "scivector_slice"; }
243
244inline string nameof(const srmatrix& ) { return "srmatrix"; }
245inline string nameof(const simatrix& ) { return "simatrix"; }
246inline string nameof(const scmatrix& ) { return "scmatrix"; }
247inline string nameof(const scimatrix& ) { return "scimatrix"; }
248inline string nameof(const srmatrix_slice& ) { return "srmatrix_slice"; }
249inline string nameof(const simatrix_slice& ) { return "simatrix_slice"; }
250inline string nameof(const scmatrix_slice& ) { return "scmatrix_slice"; }
251inline string nameof(const scimatrix_slice& ) { return "scimatrix_slice"; }
252inline string nameof(const srmatrix_subv& ) { return "srmatrix_subv"; }
253inline string nameof(const simatrix_subv& ) { return "simatrix_subv"; }
254inline string nameof(const scmatrix_subv& ) { return "scmatrix_subv"; }
255inline 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