C-XSC - A C++ Class Library for Extended Scientific Computing 2.5.4
cvecrmat.inl
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: cvecrmat.inl,v 1.24 2014/01/30 17:23:44 cxsc Exp $ */
25
26// Here are definitions for cvector x rmatrix-Functions
27#ifndef _CXSC_CVECRMAT_INL_INCLUDED
28#define _CXSC_CVECRMAT_INL_INCLUDED
29
30namespace cxsc {
31
32 INLINE cvector::cvector(const rmatrix &sl)
33#if(CXSC_INDEX_CHECK)
34
35#else
36 noexcept
37#endif
38 { _vmconstr<cvector,rmatrix,complex>(*this,sl); }
40#if(CXSC_INDEX_CHECK)
41
42#else
43 noexcept
44#endif
45 { _vmsconstr<cvector,rmatrix_slice,complex>(*this,sl); }
46 INLINE cvector::cvector(const rmatrix_subv &v) noexcept:l(v.lb),u(v.ub),size(v.size)
47 {
48 dat=new complex[size];
49 for (int i=0, j=v.start;i<v.size;i++,j+=v.offset)
50 dat[i]=v.dat[j];
51 }
52 INLINE cvector _cvector(const rmatrix &sl)
53#if(CXSC_INDEX_CHECK)
54
55#else
56 noexcept
57#endif
58 { return cvector(sl); }
59 INLINE cvector _cvector(const rmatrix_slice &sl)
60#if(CXSC_INDEX_CHECK)
61
62#else
63 noexcept
64#endif
65 { return cvector(sl); }
66
67// INLINE void accumulate(cdotprecision &dp, const rmatrix_subv & rv1, const cvector &rv2)
68// #if(CXSC_INDEX_CHECK)
69//
70// #else
71// noexcept
72// #endif
73// { _vmvaccu<cdotprecision,cvector,rmatrix_subv>(dp,rv2,rv1); }
74// INLINE void accumulate(cdotprecision &dp, const cvector & rv1, const rmatrix_subv &rv2)
75// #if(CXSC_INDEX_CHECK)
76//
77// #else
78// noexcept
79// #endif
80// { _vmvaccu<cdotprecision,cvector,rmatrix_subv>(dp,rv1,rv2); }
81// INLINE void accumulate(cidotprecision &dp, const rmatrix_subv & rv1, const cvector &rv2)
82// #if(CXSC_INDEX_CHECK)
83//
84// #else
85// noexcept
86// #endif
87// { _vmvaccu<cidotprecision,cvector,rmatrix_subv>(dp,rv2,rv1); }
88// INLINE void accumulate(cidotprecision &dp, const cvector & rv1, const rmatrix_subv &rv2)
89// #if(CXSC_INDEX_CHECK)
90//
91// #else
92// noexcept
93// #endif
94// { _vmvaccu<cidotprecision,cvector,rmatrix_subv>(dp,rv1,rv2); }
95//
96// INLINE void accumulate(cdotprecision &dp, const rmatrix_subv & rv1, const cvector_slice &rv2)
97// #if(CXSC_INDEX_CHECK)
98//
99// #else
100// noexcept
101// #endif
102// { _vmvaccu<cdotprecision,cvector,rmatrix_subv>(dp,cvector(rv2),rv1); }
103// INLINE void accumulate(cdotprecision &dp, const cvector_slice & rv1, const rmatrix_subv &rv2)
104// #if(CXSC_INDEX_CHECK)
105//
106// #else
107// noexcept
108// #endif
109// { _vmvaccu<cdotprecision,cvector,rmatrix_subv>(dp,cvector(rv1),rv2); }
110// INLINE void accumulate(cidotprecision &dp, const rmatrix_subv & rv1, const cvector_slice &rv2)
111// #if(CXSC_INDEX_CHECK)
112//
113// #else
114// noexcept
115// #endif
116// { _vmvaccu<cidotprecision,cvector,rmatrix_subv>(dp,cvector(rv2),rv1); }
117// INLINE void accumulate(cidotprecision &dp, const cvector_slice & rv1, const rmatrix_subv &rv2)
118// #if(CXSC_INDEX_CHECK)
119//
120// #else
121// noexcept
122// #endif
123// { _vmvaccu<cidotprecision,cvector,rmatrix_subv>(dp,cvector(rv1),rv2); }
124
125 INLINE cvector &cvector::operator =(const rmatrix_subv &mv) noexcept { return _vmvassign<cvector,rmatrix_subv,complex>(*this,mv); }
126 INLINE cvector_slice &cvector_slice::operator =(const rmatrix_subv &mv) noexcept { return _vsvassign(*this,rvector(mv)); }
128#if(CXSC_INDEX_CHECK)
129
130#else
131 noexcept
132#endif
133 { return _vmassign<cvector,rmatrix,complex>(*this,m); }
135#if(CXSC_INDEX_CHECK)
136
137#else
138 noexcept
139#endif
140 { return _vmassign<cvector,rmatrix,complex>(*this,rmatrix(m)); }
142#if(CXSC_INDEX_CHECK)
143
144#else
145 noexcept
146#endif
147 { return _vsvassign(*this,rvector(m)); }
149#if(CXSC_INDEX_CHECK)
150
151#else
152 noexcept
153#endif
154 { return _vsvassign(*this,cvector(rmatrix(m))); }
155
156 INLINE cvector operator *(const rmatrix &m,const cvector &v)
157#if(CXSC_INDEX_CHECK)
158
159#else
160 noexcept
161#endif
162 { return _mvcmult<rmatrix,cvector,cvector>(m,v); }
163 INLINE cvector operator *(const rmatrix_slice &ms,const cvector &v)
164#if(CXSC_INDEX_CHECK)
165
166#else
167 noexcept
168#endif
169 { return _msvcmult<rmatrix_slice,cvector,cvector>(ms,v); }
170 INLINE cvector operator *(const cvector &v,const rmatrix &m)
171#if(CXSC_INDEX_CHECK)
172
173#else
174 noexcept
175#endif
176 { return _vmcmult<cvector,rmatrix,cvector>(v,m); }
177 INLINE cvector operator *(const cvector &v,const rmatrix_slice &ms)
178#if(CXSC_INDEX_CHECK)
179
180#else
181 noexcept
182#endif
183 { return _vmscmult<cvector,rmatrix_slice,cvector>(v,ms); }
184 INLINE cvector &operator *=(cvector &v,const rmatrix &m)
185#if(CXSC_INDEX_CHECK)
186
187#else
188 noexcept
189#endif
190 { return _vmcmultassign<cvector,rmatrix,complex>(v,m); }
191 INLINE cvector &operator *=(cvector &v,const rmatrix_slice &ms)
192#if(CXSC_INDEX_CHECK)
193
194#else
195 noexcept
196#endif
197 { return _vmscmultassign<cvector,rmatrix_slice,complex>(v,ms); }
198
199 INLINE cvector operator *(const cvector_slice &v,const rmatrix &m)
200#if(CXSC_INDEX_CHECK)
201
202#else
203 noexcept
204#endif
205 { return _vmcmult<cvector,rmatrix,cvector>(cvector(v),m); }
207#if(CXSC_INDEX_CHECK)
208
209#else
210 noexcept
211#endif
212 { return _vsmcmultassign<cvector_slice,rmatrix,complex>(*this,m); }
213
214} // namespace cxsc
215
216#endif
217
The Scalar Type complex.
Definition complex.hpp:50
The Data Type cvector_slice.
Definition cvector.hpp:845
cvector_slice & operator=(const scvector &sl)
Implementation of standard assigning operator.
cvector_slice & operator*=(const complex &r) noexcept
Implementation of multiplication and allocation operation.
Definition cvector.inl:423
The Data Type cvector.
Definition cvector.hpp:58
cvector() noexcept
Constructor of class cvector.
Definition cvector.inl:31
cvector & operator=(const cvector &rv) noexcept
Implementation of standard assigning operator.
Definition cvector.inl:276
The Data Type rmatrix_slice.
Definition rmatrix.hpp:1443
The Data Type rmatrix_subv.
Definition rmatrix.hpp:54
The Data Type rmatrix.
Definition rmatrix.hpp:471
The Data Type rvector.
Definition rvector.hpp:58
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition cdot.cpp:29
cimatrix & operator*=(cimatrix &m, const cinterval &c) noexcept
Implementation of multiplication and allocation operation.
civector operator*(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of multiplication operation.
Definition cimatrix.inl:731