C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
l_rvector.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: l_rvector.inl,v 1.19 2014/01/30 17:23:47 cxsc Exp $ */
25 
26 #ifndef _CXSC_LRVECTOR_INL_INCLUDED
27 #define _CXSC_LRVECTOR_INL_INCLUDED
28 
29 namespace cxsc {
30 
31  INLINE l_rvector::l_rvector () noexcept:dat(NULL),l(1),u(0),size(0)
32  {
33  }
34 
35  INLINE l_rvector::l_rvector(const int &i) noexcept:l(1),u(i),size(i)
36  {
37  dat=new l_real[i];
38  }
39 
40 #ifdef OLD_CXSC
41  INLINE l_rvector::l_rvector(const class index &i) noexcept:l(1),u(i._int()),size(i._int())
42  {
43  dat=new l_real[i._int()];
44  }
45 #endif
46 
47  INLINE l_rvector::l_rvector(const int &i1,const int &i2)
48 #if(CXSC_INDEX_CHECK)
49  :l(i1),u(i2),size(i2-i1+1)
50 #else
51  noexcept:l(i1),u(i2),size(i2-i1+1)
52 #endif
53  {
54 #if(CXSC_INDEX_CHECK)
55  if(i1>i2) cxscthrow(ERROR_LRVECTOR_WRONG_BOUNDARIES("l_rvector::l_rvector(const int &i1,const int &i2)"));
56 #endif
57  dat=new l_real[size];
58  }
59 
60  INLINE l_rvector::l_rvector(const l_rvector_slice &rs) noexcept:l(rs.start),u(rs.end),size(rs.end-rs.start+1)
61  {
62  dat=new l_real[size];
63  for(int i=0, j=l-rs.l;i<size;i++,j++)
64  dat[i]=rs.dat[j];
65  }
66 
67  INLINE l_rvector::l_rvector(const l_rvector &v) noexcept:l(v.l),u(v.u),size(v.size)
68  {
69  dat=new l_real[size];
70  for (int i=0;i<size;i++)
71  dat[i]=v.dat[i];
72  }
73 
74  INLINE l_rvector::l_rvector(const l_real &r) noexcept:l(1),u(1),size(1)
75  {
76  dat=new l_real[1];
77  *dat=r;
78  }
79 
80  INLINE l_rvector::l_rvector(const rvector_slice &rs) noexcept:l(rs.start),u(rs.end),size(rs.end-rs.start+1)
81  {
82  dat=new l_real[size];
83  for(int i=0, j=l-rs.l;i<size;i++,j++)
84  dat[i]=rs.dat[j];
85  }
86 
87  INLINE l_rvector::l_rvector(const rvector &v) noexcept:l(v.l),u(v.u),size(v.size)
88  {
89  dat=new l_real[size];
90  for (int i=0;i<size;i++)
91  dat[i]=v.dat[i];
92  }
93 
94  INLINE l_rvector::l_rvector(const real &r) noexcept:l(1),u(1),size(1)
95  {
96  dat=new l_real[1];
97  *dat=r;
98  }
99 
100  INLINE l_real & l_rvector::operator [](const int &i) const
101 #if(CXSC_INDEX_CHECK)
102 
103 #else
104  noexcept
105 #endif
106  {
107 #if(CXSC_INDEX_CHECK)
108  if(i<l||i>u) cxscthrow(ERROR_LRVECTOR_ELEMENT_NOT_IN_VEC("l_real & l_rvector::operator [](const int &i)"));
109 #endif
110  return dat[i-l];
111  }
112 
113  INLINE l_real & l_rvector_slice::operator [](const int &i) const
114 #if(CXSC_INDEX_CHECK)
115 
116 #else
117  noexcept
118 #endif
119  {
120 #if(CXSC_INDEX_CHECK)
121  if(i<start||i>end) cxscthrow(ERROR_LRVECTOR_ELEMENT_NOT_IN_VEC("l_real & l_rvector_slice::operator [](const int &i)"));
122 #endif
123  return dat[i-l];
124  }
125 
127 #if(CXSC_INDEX_CHECK)
128 
129 #else
130  noexcept
131 #endif
132  {
133 #if(CXSC_INDEX_CHECK)
134  if(1<l||i>u) cxscthrow(ERROR_LRVECTOR_SUB_ARRAY_TOO_BIG("l_rvector_slice l_rvector::operator ()(const int &i)"));
135 #endif
136  return l_rvector_slice(*this,1,i);
137  }
138 
139  INLINE l_rvector_slice l_rvector::operator ()(const int &i1,const int &i2)
140 #if(CXSC_INDEX_CHECK)
141 
142 #else
143  noexcept
144 #endif
145  {
146 #if(CXSC_INDEX_CHECK)
147  if(i1<l||i2>u) cxscthrow(ERROR_LRVECTOR_SUB_ARRAY_TOO_BIG("l_rvector_slice l_rvector::operator ()(const int &i1,const int &i2)"));
148 #endif
149  return l_rvector_slice(*this,i1,i2);
150  }
151 
153 #if(CXSC_INDEX_CHECK)
154 
155 #else
156  noexcept
157 #endif
158  {
159 #if(CXSC_INDEX_CHECK)
160  if(1<start||i>end) cxscthrow(ERROR_LRVECTOR_SUB_ARRAY_TOO_BIG("l_rvector_slice l_rvector_slice::operator ()(const int &i)"));
161 #endif
162  return l_rvector_slice(*this,1,i);
163  }
164 
165  INLINE l_rvector_slice l_rvector_slice::operator ()(const int &i1,const int &i2)
166 #if(CXSC_INDEX_CHECK)
167 
168 #else
169  noexcept
170 #endif
171  {
172 #if(CXSC_INDEX_CHECK)
173  if(i1<start||i2>end) cxscthrow(ERROR_LRVECTOR_SUB_ARRAY_TOO_BIG("l_rvector_slice l_rvector_slice::operator ()(const int &i1,const int &i2)"));
174 #endif
175  return l_rvector_slice(*this,i1,i2);
176  }
177 
178  INLINE l_real::l_real(const l_rvector &rv)
179 #if(CXSC_INDEX_CHECK)
180 
181 #else
182  noexcept
183 #endif
184  {
185 #if(CXSC_INDEX_CHECK)
186  if(rv.size>1) cxscthrow(ERROR_LRVECTOR_TYPE_CAST_OF_THICK_OBJ("l_real::l_real(const l_rvector &rv)"));
187  else if(rv.size<1) cxscthrow(ERROR_LRVECTOR_USE_OF_UNINITIALIZED_OBJ("l_real::l_real(const l_rvector &rv)"));
188 #endif
189  *this=rv.dat[0];
190  }
191 
192  INLINE l_real::l_real(const l_rvector_slice &sl)
193 #if(CXSC_INDEX_CHECK)
194 
195 #else
196  noexcept
197 #endif
198  {
199 #if(CXSC_INDEX_CHECK)
200  if(sl.size>1) cxscthrow(ERROR_LRVECTOR_TYPE_CAST_OF_THICK_OBJ("l_real::l_real(const l_rvector_slice &sl)"));
201  else if(sl.size<1) cxscthrow(ERROR_LRVECTOR_USE_OF_UNINITIALIZED_OBJ("l_real::l_real(const l_rvector_slice &sl)"));
202 #endif
203  *this=sl.dat[sl.start-sl.l];
204  }
205 
211  INLINE l_rvector _l_rvector(const l_real &r) noexcept { return l_rvector(r); }
217  INLINE l_rvector _l_rvector(const real &r) noexcept { return l_rvector(r); }
223  INLINE l_rvector _l_rvector(const rvector_slice &rs) noexcept { return l_rvector(rs); }
229  INLINE l_rvector _l_rvector(const rvector &rs) noexcept { return l_rvector(rs); }
235  INLINE l_rvector &l_rvector::operator =(const l_rvector &rv) noexcept { return _vvassign<l_rvector,l_rvector,l_real>(*this,rv); }
236  INLINE l_rvector &l_rvector::operator =(const l_real &r) noexcept { return _vsassign<l_rvector,l_real>(*this,r); }
237  INLINE l_rvector &l_rvector::operator =(const rvector &rv) noexcept { return _vvassign<l_rvector,rvector,l_real>(*this,rv); }
238  INLINE l_rvector &l_rvector::operator =(const real &r) noexcept { return _vsassign<l_rvector,real>(*this,r); }
239  INLINE l_rvector::operator void*() noexcept { return _vvoid(*this); }
241 #if(CXSC_INDEX_CHECK)
242 
243 #else
244  noexcept
245 #endif
246  { return _vsvsassign(*this,sl); }
248 #if(CXSC_INDEX_CHECK)
249 
250 #else
251  noexcept
252 #endif
253  { return _vsvassign(*this,rv); }
254  INLINE l_rvector_slice & l_rvector_slice::operator =(const l_real &r) noexcept { return _vssassign<l_rvector_slice,l_real>(*this,r); }
255 
257 #if(CXSC_INDEX_CHECK)
258 
259 #else
260  noexcept
261 #endif
262  { return _vsvsassign(*this,sl); }
264 #if(CXSC_INDEX_CHECK)
265 
266 #else
267  noexcept
268 #endif
269  { return _vsvassign(*this,rv); }
270  INLINE l_rvector_slice & l_rvector_slice::operator =(const real &r) noexcept { return _vssassign(*this,r); }
271  INLINE l_rvector_slice::operator void*() noexcept { return _vsvoid(*this); }
272 
273 //=======================================================================
274 //======================== Vector Functions =============================
275 
276  INLINE void Resize(l_rvector &rv) noexcept { _vresize(rv); }
277  INLINE void Resize(l_rvector &rv, const int &len)
278 #if(CXSC_INDEX_CHECK)
279 
280 #else
281  noexcept
282 #endif
283  { _vresize<class l_rvector,class l_real>(rv,len); }
284  INLINE void Resize(l_rvector &rv, const int &lb, const int &ub)
285 #if(CXSC_INDEX_CHECK)
286 
287 #else
288  noexcept
289 #endif
290  { _vresize<class l_rvector,class l_real>(rv,lb,ub); }
291 
292  INLINE l_rvector abs(const l_rvector &rv) noexcept { return _vabs<l_rvector,l_rvector>(rv); }
293  INLINE l_rvector abs(const l_rvector_slice &sl) noexcept { return _vsabs<l_rvector_slice,l_rvector>(sl); }
294  INLINE bool operator !(const l_rvector &rv) noexcept { return _vnot(rv); }
295  INLINE bool operator !(const l_rvector_slice &sl) noexcept { return _vsnot(sl); }
296 
297 //======================= Vector / Scalar ===============================
298 
299 //----------------------------- l_real ---------------------------
300 
301  INLINE l_rvector operator *(const l_rvector &rv, const l_real &s) noexcept { return _vsmult<l_rvector,l_real,l_rvector>(rv,s); }
302  INLINE l_rvector operator *(const l_rvector_slice &sl, const l_real &s) noexcept { return _vssmult<l_rvector_slice,l_real,l_rvector>(sl,s); }
303  INLINE l_rvector operator *(const l_real &s, const l_rvector &rv) noexcept { return _vsmult<l_rvector,l_real,l_rvector>(rv,s); }
304  INLINE l_rvector operator *(const l_real &s, const l_rvector_slice &sl) noexcept { return _vssmult<l_rvector_slice,l_real,l_rvector>(sl,s); }
305  INLINE l_rvector &operator *=(l_rvector &rv,const l_real &r) noexcept { return _vsmultassign(rv,r); }
306  INLINE l_rvector_slice &l_rvector_slice::operator *=(const l_real &r) noexcept { return _vssmultassign(*this,r); }
307 
308  INLINE l_rvector operator /(const l_rvector &rv, const l_real &s) noexcept { return _vsdiv<l_rvector,l_real,l_rvector>(rv,s); }
309  INLINE l_rvector operator /(const l_rvector_slice &sl, const l_real &s) noexcept { return _vssdiv<l_rvector_slice,l_real,l_rvector>(sl,s); }
310  INLINE l_rvector &operator /=(l_rvector &rv,const l_real &r) noexcept { return _vsdivassign(rv,r); }
311  INLINE l_rvector_slice &l_rvector_slice::operator /=(const l_real &r) noexcept { return _vssdivassign(*this,r); }
312 
313 //---------------------------- Real --------------------------------------
314 
315  INLINE l_rvector operator *(const l_rvector &rv, const real &s) noexcept { return _vsmult<l_rvector,real,l_rvector>(rv,s); }
316  INLINE l_rvector operator *(const l_rvector_slice &sl, const real &s) noexcept { return _vssmult<l_rvector_slice,real,l_rvector>(sl,s); }
317  INLINE l_rvector operator *(const real &s, const l_rvector &rv) noexcept { return _vsmult<l_rvector,real,l_rvector>(rv,s); }
318  INLINE l_rvector operator *(const real &s, const l_rvector_slice &sl) noexcept { return _vssmult<l_rvector_slice,real,l_rvector>(sl,s); }
319  INLINE l_rvector &operator *=(l_rvector &rv,const real &r) noexcept { return _vsmultassign(rv,r); }
320  INLINE l_rvector_slice &l_rvector_slice::operator *=(const real &r) noexcept { return _vssmultassign(*this,r); }
321 
322  INLINE l_rvector operator /(const l_rvector &rv, const real &s) noexcept { return _vsdiv<l_rvector,real,l_rvector>(rv,s); }
323  INLINE l_rvector operator /(const l_rvector_slice &sl, const real &s) noexcept { return _vssdiv<l_rvector_slice,real,l_rvector>(sl,s); }
324  INLINE l_rvector &operator /=(l_rvector &rv,const real &r) noexcept { return _vsdivassign(rv,r); }
325  INLINE l_rvector_slice &l_rvector_slice::operator /=(const real &r) noexcept { return _vssdivassign(*this,r); }
326 
327  INLINE l_rvector operator *(const rvector &rv, const l_real &s) noexcept { return _vsmult<rvector,l_real,l_rvector>(rv,s); }
328  INLINE l_rvector operator *(const rvector_slice &sl, const l_real &s) noexcept { return _vssmult<rvector_slice,l_real,l_rvector>(sl,s); }
329  INLINE l_rvector operator *(const l_real &s, const rvector &rv) noexcept { return _vsmult<rvector,l_real,l_rvector>(rv,s); }
330  INLINE l_rvector operator *(const l_real &s, const rvector_slice &sl) noexcept { return _vssmult<rvector_slice,l_real,l_rvector>(sl,s); }
331 
332  INLINE l_rvector operator /(const rvector &rv, const l_real &s) noexcept { return _vsdiv<rvector,l_real,l_rvector>(rv,s); }
333  INLINE l_rvector operator /(const rvector_slice &sl, const l_real &s) noexcept { return _vssdiv<rvector_slice,l_real,l_rvector>(sl,s); }
334 
335 //======================= Vector / Vector ===============================
336 
337 
338  INLINE std::ostream &operator <<(std::ostream &s, const l_rvector &rv) noexcept { return _vout(s,rv); }
339  INLINE std::ostream &operator <<(std::ostream &o, const l_rvector_slice &sl) noexcept { return _vsout(o,sl); }
340  INLINE std::istream &operator >>(std::istream &s, l_rvector &rv) noexcept { return _vin(s,rv); }
341  INLINE std::istream &operator >>(std::istream &s, l_rvector_slice &rv) noexcept { return _vsin(s,rv); }
342 
343 //----------------------- l_real / l_real ---------------------------
344  INLINE l_rvector & l_rvector::operator =(const l_rvector_slice &sl) noexcept { return _vvsassign<l_rvector,l_rvector_slice,l_real>(*this,sl); }
345 
346  INLINE void accumulate(dotprecision &dp, const l_rvector & rv1, const l_rvector &rv2)
347 #if(CXSC_INDEX_CHECK)
348 
349 #else
350  noexcept
351 #endif
352  { _vvaccu(dp,rv1,rv2); }
353  INLINE void accumulate(dotprecision &dp, const l_rvector_slice & sl, const l_rvector &rv)
354 #if(CXSC_INDEX_CHECK)
355 
356 #else
357  noexcept
358 #endif
359  { _vsvaccu(dp,sl,rv); }
360  INLINE void accumulate(dotprecision &dp, const l_rvector &rv, const l_rvector_slice &sl)
361 #if(CXSC_INDEX_CHECK)
362 
363 #else
364  noexcept
365 #endif
366  { _vsvaccu(dp,sl,rv); }
367  INLINE void accumulate(dotprecision &dp, const l_rvector & rv1, const l_rmatrix_subv &rv2)
368 #if(CXSC_INDEX_CHECK)
369 
370 #else
371  noexcept
372 #endif
373  ;
374  INLINE void accumulate(dotprecision &dp, const l_rmatrix_subv & rv1, const l_rvector &rv2)
375 #if(CXSC_INDEX_CHECK)
376 
377 #else
378  noexcept
379 #endif
380  ;
381  INLINE void accumulate(dotprecision &dp, const l_rmatrix_subv & rv1, const l_rmatrix_subv &rv2)
382 #if(CXSC_INDEX_CHECK)
383 
384 #else
385  noexcept
386 #endif
387  ;
388  INLINE void accumulate(dotprecision &dp, const l_rvector_slice & sl1, const l_rvector_slice &sl2)
389 #if(CXSC_INDEX_CHECK)
390 
391 #else
392  noexcept
393 #endif
394  { _vsvsaccu(dp,sl1,sl2); }
395  INLINE void accumulate(idotprecision &dp, const l_rvector & rv1, const l_rvector &rv2)
396 #if(CXSC_INDEX_CHECK)
397 
398 #else
399  noexcept
400 #endif
401  { _vvaccu(dp,rv1,rv2); }
402  INLINE void accumulate(idotprecision &dp, const l_rvector_slice & sl, const l_rvector &rv)
403 #if(CXSC_INDEX_CHECK)
404 
405 #else
406  noexcept
407 #endif
408  { _vsvaccu(dp,sl,rv); }
409  INLINE void accumulate(idotprecision &dp, const l_rvector &rv, const l_rvector_slice &sl)
410 #if(CXSC_INDEX_CHECK)
411 
412 #else
413  noexcept
414 #endif
415  { _vsvaccu(dp,sl,rv); }
416  INLINE void accumulate(idotprecision &dp, const l_rvector & rv1, const l_rmatrix_subv &rv2)
417 #if(CXSC_INDEX_CHECK)
418 
419 #else
420  noexcept
421 #endif
422  ;
423  INLINE void accumulate(idotprecision &dp, const l_rmatrix_subv & rv1, const l_rvector &rv2)
424 #if(CXSC_INDEX_CHECK)
425 
426 #else
427  noexcept
428 #endif
429  ;
430  INLINE void accumulate(idotprecision &dp, const l_rmatrix_subv & rv1, const l_rmatrix_subv &rv2)
431 #if(CXSC_INDEX_CHECK)
432 
433 #else
434  noexcept
435 #endif
436  ;
437  INLINE void accumulate(idotprecision &dp, const l_rvector_slice & sl1, const l_rvector_slice &sl2)
438 #if(CXSC_INDEX_CHECK)
439 
440 #else
441  noexcept
442 #endif
443  { _vsvsaccu(dp,sl1,sl2); }
444 
445 
446  INLINE l_real operator *(const l_rvector & rv1, const l_rvector &rv2)
447 #if(CXSC_INDEX_CHECK)
448 
449 #else
450  noexcept
451 #endif
452  { return _vvlmult<l_rvector,l_rvector,l_real>(rv1,rv2); }
453  INLINE l_real operator *(const l_rvector_slice &sl, const l_rvector &rv)
454 #if(CXSC_INDEX_CHECK)
455 
456 #else
457  noexcept
458 #endif
459  { return _vsvlmult<l_rvector_slice,l_rvector,l_real>(sl,rv); }
460  INLINE l_real operator *(const l_rvector &rv, const l_rvector_slice &sl)
461 #if(CXSC_INDEX_CHECK)
462 
463 #else
464  noexcept
465 #endif
466  { return _vsvlmult<l_rvector_slice,l_rvector,l_real>(sl,rv); }
467  INLINE l_real operator *(const l_rvector_slice & sl1, const l_rvector_slice &sl2)
468 #if(CXSC_INDEX_CHECK)
469 
470 #else
471  noexcept
472 #endif
473  { return _vsvslmult<l_rvector_slice,l_rvector_slice,l_real>(sl1,sl2); }
474 
475  INLINE const l_rvector &operator +(const l_rvector &rv) noexcept { return rv; }
476  INLINE l_rvector operator +(const l_rvector_slice &sl) noexcept { return sl; }
477  INLINE l_rvector operator +(const l_rvector &rv1, const l_rvector &rv2)
478 #if(CXSC_INDEX_CHECK)
479 
480 #else
481  noexcept
482 #endif
483  { return _vvplus<l_rvector,l_rvector,l_rvector>(rv1,rv2); }
484  INLINE l_rvector operator +(const l_rvector &rv, const l_rvector_slice &sl)
485 #if(CXSC_INDEX_CHECK)
486 
487 #else
488  noexcept
489 #endif
490  { return _vvsplus<l_rvector,l_rvector_slice,l_rvector>(rv,sl); }
491  INLINE l_rvector operator +(const l_rvector_slice &sl, const l_rvector &rv)
492 #if(CXSC_INDEX_CHECK)
493 
494 #else
495  noexcept
496 #endif
497  { return _vvsplus<l_rvector,l_rvector_slice,l_rvector>(rv,sl); }
498  INLINE l_rvector operator +(const l_rvector_slice &sl1, const l_rvector_slice &sl2)
499 #if(CXSC_INDEX_CHECK)
500 
501 #else
502  noexcept
503 #endif
504  { return _vsvsplus<l_rvector_slice,l_rvector_slice,l_rvector>(sl1,sl2); }
505  INLINE l_rvector & operator +=(l_rvector &rv1, const l_rvector &rv2)
506 #if(CXSC_INDEX_CHECK)
507 
508 #else
509  noexcept
510 #endif
511  { return _vvplusassign(rv1,rv2); }
513 #if(CXSC_INDEX_CHECK)
514 
515 #else
516  noexcept
517 #endif
518  { return _vvsplusassign(rv,sl); }
520 #if(CXSC_INDEX_CHECK)
521 
522 #else
523  noexcept
524 #endif
525  { return _vsvplusassign(*this,rv); }
527 #if(CXSC_INDEX_CHECK)
528 
529 #else
530  noexcept
531 #endif
532  { return _vsvsplusassign(*this,sl2); }
533 
534  INLINE l_rvector operator -(const l_rvector &rv) noexcept { return _vminus(rv); }
535  INLINE l_rvector operator -(const l_rvector_slice &sl) noexcept { return _vsminus<l_rvector_slice,l_rvector>(sl); }
536  INLINE l_rvector operator -(const l_rvector &rv1, const l_rvector &rv2)
537 #if(CXSC_INDEX_CHECK)
538 
539 #else
540  noexcept
541 #endif
542  { return _vvminus<l_rvector,l_rvector,l_rvector>(rv1,rv2); }
543  INLINE l_rvector operator -(const l_rvector &rv, const l_rvector_slice &sl)
544 #if(CXSC_INDEX_CHECK)
545 
546 #else
547  noexcept
548 #endif
549  { return _vvsminus<l_rvector,l_rvector_slice,l_rvector>(rv,sl); }
550  INLINE l_rvector operator -(const l_rvector_slice &sl, const l_rvector &rv)
551 #if(CXSC_INDEX_CHECK)
552 
553 #else
554  noexcept
555 #endif
556  { return _vsvminus<l_rvector_slice,l_rvector,l_rvector>(sl,rv); }
557  INLINE l_rvector operator -(const l_rvector_slice &sl1, const l_rvector_slice &sl2)
558 #if(CXSC_INDEX_CHECK)
559 
560 #else
561  noexcept
562 #endif
563  { return _vsvsminus<l_rvector_slice,l_rvector_slice,l_rvector>(sl1,sl2); }
564  INLINE l_rvector & operator -=(l_rvector &rv1, const l_rvector &rv2)
565 #if(CXSC_INDEX_CHECK)
566 
567 #else
568  noexcept
569 #endif
570  { return _vvminusassign(rv1,rv2); }
571  INLINE l_rvector &operator -=(l_rvector &rv, const l_rvector_slice &sl)
572 #if(CXSC_INDEX_CHECK)
573 
574 #else
575  noexcept
576 #endif
577  { return _vvsminusassign(rv,sl); }
579 #if(CXSC_INDEX_CHECK)
580 
581 #else
582  noexcept
583 #endif
584  { return _vsvminusassign(*this,rv); }
586 #if(CXSC_INDEX_CHECK)
587 
588 #else
589  noexcept
590 #endif
591  { return _vsvsminusassign(*this,sl2); }
592 
593  INLINE bool operator ==(const l_rvector &rv1, const l_rvector &rv2) noexcept { return _vveq(rv1,rv2); }
594  INLINE bool operator ==(const l_rvector_slice &sl1, const l_rvector_slice &sl2) noexcept { return _vsvseq(sl1,sl2); }
595  INLINE bool operator ==(const l_rvector_slice &sl, const l_rvector &rv) noexcept { return _vsveq(sl,rv); }
596  INLINE bool operator ==(const l_rvector &rv, const l_rvector_slice &sl) noexcept { return _vsveq(sl,rv); }
597  INLINE bool operator !=(const l_rvector &rv1, const l_rvector &rv2) noexcept { return _vvneq(rv1,rv2); }
598  INLINE bool operator !=(const l_rvector_slice &sl1, const l_rvector_slice &sl2) noexcept { return _vsvsneq(sl1,sl2); }
599  INLINE bool operator !=(const l_rvector_slice &sl, const l_rvector &rv) noexcept { return _vsvneq(sl,rv); }
600  INLINE bool operator !=(const l_rvector &rv, const l_rvector_slice &sl) noexcept { return _vsvneq(sl,rv); }
601  INLINE bool operator <(const l_rvector &rv1, const l_rvector &rv2) noexcept { return _vvless(rv1,rv2); }
602  INLINE bool operator <(const l_rvector_slice &sl1, const l_rvector_slice &sl2) noexcept { return _vsvsless(sl1,sl2); }
603  INLINE bool operator < (const l_rvector_slice &sl, const l_rvector &rv) noexcept { return _vsvless(sl,rv); }
604  INLINE bool operator < (const l_rvector &rv, const l_rvector_slice &sl) noexcept { return _vvsless(rv,sl); }
605  INLINE bool operator <=(const l_rvector &rv1, const l_rvector &rv2) noexcept { return _vvleq(rv1,rv2); }
606  INLINE bool operator <=(const l_rvector_slice &sl1, const l_rvector_slice &sl2) noexcept { return _vsvsleq(sl1,sl2); }
607  INLINE bool operator <=(const l_rvector_slice &sl, const l_rvector &rv) noexcept { return _vsvleq(sl,rv); }
608  INLINE bool operator <=(const l_rvector &rv, const l_rvector_slice &sl) noexcept { return _vvsleq(rv,sl); }
609  INLINE bool operator >(const l_rvector &rv1, const l_rvector &rv2) noexcept { return _vvless(rv2,rv1); }
610  INLINE bool operator >(const l_rvector_slice &sl1, const l_rvector_slice &sl2) noexcept { return _vsvsless(sl2,sl1); }
611  INLINE bool operator >(const l_rvector_slice &sl, const l_rvector &rv) noexcept { return _vvsless(rv,sl); }
612  INLINE bool operator >(const l_rvector &rv, const l_rvector_slice &sl) noexcept { return _vsvless(sl,rv); }
613  INLINE bool operator >=(const l_rvector &rv1, const l_rvector &rv2) noexcept { return _vvleq(rv2,rv1); }
614  INLINE bool operator >=(const l_rvector_slice &sl1, const l_rvector_slice &sl2) noexcept { return _vsvsleq(sl2,sl1); }
615  INLINE bool operator >=(const l_rvector_slice &sl, const l_rvector &rv) noexcept { return _vvsleq(rv,sl); }
616  INLINE bool operator >=(const l_rvector &rv, const l_rvector_slice &sl) noexcept { return _vsvleq(sl,rv); }
617 
618 //-------------------------------- l_real / Real --------------------------------
619 
620  INLINE l_rvector & l_rvector::operator =(const rvector_slice &sl) noexcept { return _vvsassign<l_rvector,rvector_slice,l_real>(*this,sl); }
621 
622  INLINE void accumulate(dotprecision &dp, const l_rvector & rv1, const rvector &rv2)
623 #if(CXSC_INDEX_CHECK)
624 
625 #else
626  noexcept
627 #endif
628  { _vvaccu(dp,rv2,rv1); }
629  INLINE void accumulate(dotprecision &dp, const rvector & rv1, const l_rvector &rv2)
630 #if(CXSC_INDEX_CHECK)
631 
632 #else
633  noexcept
634 #endif
635  { _vvaccu(dp,rv1,rv2); }
636  INLINE void accumulate(dotprecision &dp, const rvector_slice & sl, const l_rvector &rv)
637 #if(CXSC_INDEX_CHECK)
638 
639 #else
640  noexcept
641 #endif
642  { _vsvaccu(dp,sl,rv); }
643  INLINE void accumulate(dotprecision &dp,const l_rvector_slice &sl,const rvector &rv)
644 #if(CXSC_INDEX_CHECK)
645 
646 #else
647  noexcept
648 #endif
649  { _vsvaccu(dp,sl,rv); }
650  INLINE void accumulate(dotprecision &dp, const rvector &rv, const l_rvector_slice &sl)
651 #if(CXSC_INDEX_CHECK)
652 
653 #else
654  noexcept
655 #endif
656  { _vsvaccu(dp,sl,rv); }
657  INLINE void accumulate(dotprecision &dp, const rvector & rv1, const l_rmatrix_subv &rv2)
658 #if(CXSC_INDEX_CHECK)
659 
660 #else
661  noexcept
662 #endif
663  ;
664  INLINE void accumulate(dotprecision &dp, const l_rvector & rv1, const rmatrix_subv &rv2)
665 #if(CXSC_INDEX_CHECK)
666 
667 #else
668  noexcept
669 #endif
670  ;
671  INLINE void accumulate(dotprecision &dp,const l_rvector &rv,const rvector_slice &sl)
672 #if(CXSC_INDEX_CHECK)
673 
674 #else
675  noexcept
676 #endif
677  { _vsvaccu(dp,sl,rv); }
678  INLINE void accumulate(dotprecision &dp, const rmatrix_subv & rv1, const l_rvector &rv2)
679 #if(CXSC_INDEX_CHECK)
680 
681 #else
682  noexcept
683 #endif
684  ;
685  INLINE void accumulate(dotprecision &dp, const l_rmatrix_subv & rv1, const rvector &rv2)
686 #if(CXSC_INDEX_CHECK)
687 
688 #else
689  noexcept
690 #endif
691  ;
692  INLINE void accumulate(dotprecision &dp, const rmatrix_subv & rv1, const l_rmatrix_subv &rv2)
693 #if(CXSC_INDEX_CHECK)
694 
695 #else
696  noexcept
697 #endif
698  ;
699  INLINE void accumulate(dotprecision &dp, const l_rmatrix_subv & rv1, const rmatrix_subv &rv2)
700 #if(CXSC_INDEX_CHECK)
701 
702 #else
703  noexcept
704 #endif
705  ;
706  INLINE void accumulate(dotprecision &dp, const l_rvector_slice & sl1, const rvector_slice &sl2)
707 #if(CXSC_INDEX_CHECK)
708 
709 #else
710  noexcept
711 #endif
712  { _vsvsaccu(dp,sl2,sl1); }
713  INLINE void accumulate(dotprecision &dp, const rvector_slice & sl1, const l_rvector_slice &sl2)
714 #if(CXSC_INDEX_CHECK)
715 
716 #else
717  noexcept
718 #endif
719  { _vsvsaccu(dp,sl1,sl2); }
720 
721  INLINE void accumulate(idotprecision &dp, const l_rvector & rv1, const rvector &rv2)
722 #if(CXSC_INDEX_CHECK)
723 
724 #else
725  noexcept
726 #endif
727  { _vvaccu(dp,rv2,rv1); }
728  INLINE void accumulate(idotprecision &dp, const rvector & rv1, const l_rvector &rv2)
729 #if(CXSC_INDEX_CHECK)
730 
731 #else
732  noexcept
733 #endif
734  { _vvaccu(dp,rv1,rv2); }
735  INLINE void accumulate(idotprecision &dp, const rvector_slice & sl, const l_rvector &rv)
736 #if(CXSC_INDEX_CHECK)
737 
738 #else
739  noexcept
740 #endif
741  { _vsvaccu(dp,sl,rv); }
742  INLINE void accumulate(idotprecision &dp,const l_rvector_slice &sl,const rvector &rv)
743 #if(CXSC_INDEX_CHECK)
744 
745 #else
746  noexcept
747 #endif
748  { _vsvaccu(dp,sl,rv); }
749  INLINE void accumulate(idotprecision &dp, const rvector &rv, const l_rvector_slice &sl)
750 #if(CXSC_INDEX_CHECK)
751 
752 #else
753  noexcept
754 #endif
755  { _vsvaccu(dp,sl,rv); }
756  INLINE void accumulate(idotprecision &dp, const rvector & rv1, const l_rmatrix_subv &rv2)
757 #if(CXSC_INDEX_CHECK)
758 
759 #else
760  noexcept
761 #endif
762  ;
763  INLINE void accumulate(idotprecision &dp, const l_rvector & rv1, const rmatrix_subv &rv2)
764 #if(CXSC_INDEX_CHECK)
765 
766 #else
767  noexcept
768 #endif
769  ;
770  INLINE void accumulate(idotprecision &dp,const l_rvector &rv,const rvector_slice &sl)
771 #if(CXSC_INDEX_CHECK)
772 
773 #else
774  noexcept
775 #endif
776  { _vsvaccu(dp,sl,rv); }
777  INLINE void accumulate(idotprecision &dp, const rmatrix_subv & rv1, const l_rvector &rv2)
778 #if(CXSC_INDEX_CHECK)
779 
780 #else
781  noexcept
782 #endif
783  ;
784  INLINE void accumulate(idotprecision &dp, const l_rmatrix_subv & rv1, const rvector &rv2)
785 #if(CXSC_INDEX_CHECK)
786 
787 #else
788  noexcept
789 #endif
790  ;
791  INLINE void accumulate(idotprecision &dp, const l_rvector_slice & sl1, const rvector_slice &sl2)
792 #if(CXSC_INDEX_CHECK)
793 
794 #else
795  noexcept
796 #endif
797  { _vsvsaccu(dp,sl2,sl1); }
798  INLINE void accumulate(idotprecision &dp, const rvector_slice & sl1, const l_rvector_slice &sl2)
799 #if(CXSC_INDEX_CHECK)
800 
801 #else
802  noexcept
803 #endif
804  { _vsvsaccu(dp,sl1,sl2); }
805 
806  INLINE l_real operator *(const rvector & rv1, const l_rvector &rv2)
807 #if(CXSC_INDEX_CHECK)
808 
809 #else
810  noexcept
811 #endif
812  { return _vvlmult<rvector,l_rvector,l_real>(rv1,rv2); }
813  INLINE l_real operator *(const rvector_slice &sl, const l_rvector &rv)
814 #if(CXSC_INDEX_CHECK)
815 
816 #else
817  noexcept
818 #endif
819  { return _vsvlmult<rvector_slice,l_rvector,l_real>(sl,rv); }
820  INLINE l_real operator *(const rvector &rv, const l_rvector_slice &sl)
821 #if(CXSC_INDEX_CHECK)
822 
823 #else
824  noexcept
825 #endif
826  { return _vsvlmult<l_rvector_slice,rvector,l_real>(sl,rv); }
827  INLINE l_real operator *(const rvector_slice & sl1, const l_rvector_slice &sl2)
828 #if(CXSC_INDEX_CHECK)
829 
830 #else
831  noexcept
832 #endif
833  { return _vsvslmult<rvector_slice,l_rvector_slice,l_real>(sl1,sl2); }
834 
835  INLINE l_real operator *(const l_rvector & rv1, const rvector &rv2)
836 #if(CXSC_INDEX_CHECK)
837 
838 #else
839  noexcept
840 #endif
841  { return _vvlmult<rvector,l_rvector,l_real>(rv2,rv1); }
842  INLINE l_real operator *(const l_rvector_slice &sl, const rvector &rv)
843 #if(CXSC_INDEX_CHECK)
844 
845 #else
846  noexcept
847 #endif
848  { return _vsvlmult<l_rvector_slice,rvector,l_real>(sl,rv); }
849  INLINE l_real operator *(const l_rvector &rv, const rvector_slice &sl)
850 #if(CXSC_INDEX_CHECK)
851 
852 #else
853  noexcept
854 #endif
855  { return _vsvlmult<rvector_slice,l_rvector,l_real>(sl,rv); }
856  INLINE l_real operator *(const l_rvector_slice & sl1, const rvector_slice &sl2)
857 #if(CXSC_INDEX_CHECK)
858 
859 #else
860  noexcept
861 #endif
862  { return _vsvslmult<rvector_slice,l_rvector_slice,l_real>(sl2,sl1); }
863 
864  INLINE l_rvector operator +(const rvector &rv1, const l_rvector &rv2)
865 #if(CXSC_INDEX_CHECK)
866 
867 #else
868  noexcept
869 #endif
870  { return _vvplus<rvector,l_rvector,l_rvector>(rv1,rv2); }
871  INLINE l_rvector operator +(const rvector &rv, const l_rvector_slice &sl)
872 #if(CXSC_INDEX_CHECK)
873 
874 #else
875  noexcept
876 #endif
877  { return _vvsplus<rvector,l_rvector_slice,l_rvector>(rv,sl); }
878  INLINE l_rvector operator +(const rvector_slice &sl, const l_rvector &rv)
879 #if(CXSC_INDEX_CHECK)
880 
881 #else
882  noexcept
883 #endif
884  { return _vvsplus<l_rvector,rvector_slice,l_rvector>(rv,sl); }
885  INLINE l_rvector operator +(const rvector_slice &sl1, const l_rvector_slice &sl2)
886 #if(CXSC_INDEX_CHECK)
887 
888 #else
889  noexcept
890 #endif
891  { return _vsvsplus<rvector_slice,l_rvector_slice,l_rvector>(sl1,sl2); }
892 
893  INLINE l_rvector operator +(const l_rvector &rv1, const rvector &rv2)
894 #if(CXSC_INDEX_CHECK)
895 
896 #else
897  noexcept
898 #endif
899  { return _vvplus<rvector,l_rvector,l_rvector>(rv2,rv1); }
900  INLINE l_rvector operator +(const l_rvector &rv, const rvector_slice &sl)
901 #if(CXSC_INDEX_CHECK)
902 
903 #else
904  noexcept
905 #endif
906  { return _vvsplus<l_rvector,rvector_slice,l_rvector>(rv,sl); }
907  INLINE l_rvector operator +(const l_rvector_slice &sl, const rvector &rv)
908 #if(CXSC_INDEX_CHECK)
909 
910 #else
911  noexcept
912 #endif
913  { return _vvsplus<rvector,l_rvector_slice,l_rvector>(rv,sl); }
914  INLINE l_rvector operator +(const l_rvector_slice &sl1, const rvector_slice &sl2)
915 #if(CXSC_INDEX_CHECK)
916 
917 #else
918  noexcept
919 #endif
920  { return _vsvsplus<rvector_slice,l_rvector_slice,l_rvector>(sl2,sl1); }
921 
922  INLINE l_rvector & operator +=(l_rvector &rv1, const rvector &rv2)
923 #if(CXSC_INDEX_CHECK)
924 
925 #else
926  noexcept
927 #endif
928  { return _vvplusassign(rv1,rv2); }
930 #if(CXSC_INDEX_CHECK)
931 
932 #else
933  noexcept
934 #endif
935  { return _vvsplusassign(rv,sl); }
937 #if(CXSC_INDEX_CHECK)
938 
939 #else
940  noexcept
941 #endif
942  { return _vsvplusassign(*this,rv); }
944 #if(CXSC_INDEX_CHECK)
945 
946 #else
947  noexcept
948 #endif
949  { return _vsvsplusassign(*this,sl2); }
950 
951  INLINE l_rvector operator -(const rvector &rv1, const l_rvector &rv2)
952 #if(CXSC_INDEX_CHECK)
953 
954 #else
955  noexcept
956 #endif
957  { return _vvminus<rvector,l_rvector,l_rvector>(rv1,rv2); }
958  INLINE l_rvector operator -(const rvector &rv, const l_rvector_slice &sl)
959 #if(CXSC_INDEX_CHECK)
960 
961 #else
962  noexcept
963 #endif
964  { return _vvsminus<rvector,l_rvector_slice,l_rvector>(rv,sl); }
965  INLINE l_rvector operator -(const rvector_slice &sl, const l_rvector &rv)
966 #if(CXSC_INDEX_CHECK)
967 
968 #else
969  noexcept
970 #endif
971  { return _vsvminus<rvector_slice,l_rvector,l_rvector>(sl,rv); }
972  INLINE l_rvector operator -(const rvector_slice &sl1, const l_rvector_slice &sl2)
973 #if(CXSC_INDEX_CHECK)
974 
975 #else
976  noexcept
977 #endif
978  { return _vsvsminus<rvector_slice,l_rvector_slice,l_rvector>(sl1,sl2); }
979 
980  INLINE l_rvector operator -(const l_rvector &rv1, const rvector &rv2)
981 #if(CXSC_INDEX_CHECK)
982 
983 #else
984  noexcept
985 #endif
986  { return _vvminus<l_rvector,rvector,l_rvector>(rv1,rv2); }
987  INLINE l_rvector operator -(const l_rvector &rv, const rvector_slice &sl)
988 #if(CXSC_INDEX_CHECK)
989 
990 #else
991  noexcept
992 #endif
993  { return _vvsminus<l_rvector,rvector_slice,l_rvector>(rv,sl); }
994  INLINE l_rvector operator -(const l_rvector_slice &sl, const rvector &rv)
995 #if(CXSC_INDEX_CHECK)
996 
997 #else
998  noexcept
999 #endif
1000  { return _vsvminus<l_rvector_slice,rvector,l_rvector>(sl,rv); }
1001  INLINE l_rvector operator -(const l_rvector_slice &sl1, const rvector_slice &sl2)
1002 #if(CXSC_INDEX_CHECK)
1003 
1004 #else
1005  noexcept
1006 #endif
1007  { return _vsvsminus<l_rvector_slice,rvector_slice,l_rvector>(sl1,sl2); }
1008 
1009  INLINE l_rvector & operator -=(l_rvector &rv1, const rvector &rv2)
1010 #if(CXSC_INDEX_CHECK)
1011 
1012 #else
1013  noexcept
1014 #endif
1015  { return _vvminusassign(rv1,rv2); }
1016  INLINE l_rvector &operator -=(l_rvector &rv, const rvector_slice &sl)
1017 #if(CXSC_INDEX_CHECK)
1018 
1019 #else
1020  noexcept
1021 #endif
1022  { return _vvsminusassign(rv,sl); }
1024 #if(CXSC_INDEX_CHECK)
1025 
1026 #else
1027  noexcept
1028 #endif
1029  { return _vsvminusassign(*this,rv); }
1031 #if(CXSC_INDEX_CHECK)
1032 
1033 #else
1034  noexcept
1035 #endif
1036  { return _vsvsminusassign(*this,sl2); }
1037 
1038 } // namespace cxsc
1039 
1040 #endif
1041 
cxsc::l_rvector::operator()
l_rvector & operator()() noexcept
Operator for accessing the whole vector.
Definition: l_rvector.hpp:717
cxsc::_l_rvector
INLINE l_rvector _l_rvector(const rmatrix_subv &rs) noexcept
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
Definition: l_rmatrix.inl:102
cxsc::operator*=
cimatrix & operator*=(cimatrix &m, const cinterval &c) noexcept
Implementation of multiplication and allocation operation.
Definition: cimatrix.inl:1605
cxsc::operator/
civector operator/(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of division operation.
Definition: cimatrix.inl:730
cxsc::l_real::l_real
l_real(void) noexcept
Constructor of class l_real.
Definition: l_real.cpp:174
cxsc::abs
ivector abs(const cimatrix_subv &mv) noexcept
Returns the absolute value of the matrix.
Definition: cimatrix.inl:737
cxsc::operator/=
cimatrix & operator/=(cimatrix &m, const cinterval &c) noexcept
Implementation of division and allocation operation.
Definition: cimatrix.inl:1623
cxsc::rvector
The Data Type rvector.
Definition: rvector.hpp:58
cxsc::idotprecision
The Data Type idotprecision.
Definition: idot.hpp:48
cxsc::rvector_slice
The Data Type rvector_slice.
Definition: rvector.hpp:1064
cxsc::l_rvector_slice::operator*=
l_rvector_slice & operator*=(const l_real &r) noexcept
Implementation of multiplication and allocation operation.
Definition: l_rvector.inl:306
cxsc::operator*
civector operator*(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of multiplication operation.
Definition: cimatrix.inl:731
cxsc::dotprecision
The Data Type dotprecision.
Definition: dot.hpp:112
cxsc::l_rvector_slice::operator+=
l_rvector_slice & operator+=(const l_rvector &rv) noexcept
Implementation of addition and allocation operation.
Definition: l_rvector.inl:519
cxsc::l_rvector::operator[]
l_real & operator[](const int &i) const noexcept
Operator for accessing the single elements of the vector.
Definition: l_rvector.inl:100
cxsc::l_rvector::operator=
l_rvector & operator=(const l_rvector &rv) noexcept
Implementation of standard assigning operator.
Definition: l_rvector.inl:235
cxsc::l_rvector_slice
The Multiple-Precision Data Type l_rvector_slice.
Definition: l_rvector.hpp:745
cxsc
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
cxsc::l_rvector_slice::operator-=
l_rvector_slice & operator-=(const l_rvector &rv) noexcept
Implementation of subtraction and allocation operation.
Definition: l_rvector.inl:578
cxsc::operator+=
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc) noexcept
Implementation of standard algebraic addition and allocation operation.
Definition: cdot.inl:251
cxsc::l_real
The Multiple-Precision Data Type l_real.
Definition: l_real.hpp:78
cxsc::l_rvector_slice::operator=
l_rvector_slice & operator=(const l_rvector_slice &sl) noexcept
Implementation of standard assigning operator.
Definition: l_rvector.inl:240
cxsc::l_rvector_slice::operator/=
l_rvector_slice & operator/=(const l_real &r) noexcept
Implementation of division and allocation operation.
Definition: l_rvector.inl:311
cxsc::l_rvector
The Multiple-Precision Data Type l_rvector.
Definition: l_rvector.hpp:54
cxsc::l_rvector_slice::operator()
l_rvector_slice & operator()() noexcept
Operator for accessing the whole vector.
Definition: l_rvector.hpp:1166
cxsc::Resize
void Resize(cimatrix &A) noexcept
Resizes the matrix.
Definition: cimatrix.inl:1211
cxsc::l_rvector_slice::operator[]
l_real & operator[](const int &i) const noexcept
Operator for accessing the single elements of the vector.
Definition: l_rvector.inl:113
cxsc::real
The Scalar Type real.
Definition: real.hpp:114
cxsc::l_rvector::l_rvector
l_rvector() noexcept
Constructor of class l_rvector.
Definition: l_rvector.inl:31