C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
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: rvector.inl,v 1.26 2014/01/30 17:23:48 cxsc Exp $ */
25 
26 #ifndef _CXSC_RVECTOR_INL_INCLUDED
27 #define _CXSC_RVECTOR_INL_INCLUDED
28 
29 #include "rvector.hpp"
30 #include "intvector.hpp"
31 
32 namespace cxsc {
33 
37  INLINE rvector::rvector () throw():dat(NULL),l(1),u(0),size(0)
38  {
39  }
40 
46  INLINE rvector::rvector(const int &i) throw():l(1),u(i),size(i)
47  {
48  dat=new real[i];
49  }
50 
51 #ifdef OLD_CXSC
52  INLINE rvector::rvector(const class index &i) throw():l(1),u(i._int()),size(i._int())
53  {
54  dat=new real[i._int()];
55  }
56 #endif
57 
63  INLINE rvector::rvector(const int &i1,const int &i2)
64 #if(CXSC_INDEX_CHECK)
65  throw(ERROR_RVECTOR_WRONG_BOUNDARIES,ERROR_RVECTOR_NO_MORE_MEMORY):l(i1),u(i2),size(i2-i1+1)
66 #else
67  throw():l(i1),u(i2),size(i2-i1+1)
68 #endif
69  {
70 #if(CXSC_INDEX_CHECK)
71  if(i1>i2) cxscthrow(ERROR_RVECTOR_WRONG_BOUNDARIES("rvector::rvector(const int &i1,const int &i2)"));
72 #endif
73  dat=new real[size];
74  }
75 
76  INLINE rvector::rvector(const rvector_slice &rs) throw():l(rs.start),u(rs.end),size(rs.end-rs.start+1)
77  {
78  dat=new real[size];
79  for(int i=0, j=l-rs.l;i<size;i++,j++)
80  dat[i]=rs.dat[j];
81  }
82 
83  INLINE rvector::rvector(const rvector &v) throw():l(v.l),u(v.u),size(v.size)
84  {
85  dat=new real[size];
86  for (int i=0;i<size;i++)
87  dat[i]=v.dat[i];
88  }
89 
90  INLINE rvector::rvector(const real &r) throw():l(1),u(1),size(1)
91  {
92  dat=new real[1];
93  *dat=r;
94  }
95 
96  INLINE rvector::rvector(const intvector& v) : l(Lb(v)),u(Ub(v)),size(VecLen(v)) {
97  dat=new real[size];
98  for(int i=0;i<size;i++)
99  dat[i] = v[i+l];
100  }
101 
102  INLINE real & rvector::operator [](const int &i) const
103 #if(CXSC_INDEX_CHECK)
104  throw(ERROR_RVECTOR_ELEMENT_NOT_IN_VEC)
105 #else
106  throw()
107 #endif
108  {
109 #if(CXSC_INDEX_CHECK)
110  if(i<l||i>u) cxscthrow(ERROR_RVECTOR_ELEMENT_NOT_IN_VEC("real & rvector::operator [](const int &i) const"));
111 #endif
112  return dat[i-l];
113  }
114 
115  INLINE real & rvector::operator [](const int &i)
116 #if(CXSC_INDEX_CHECK)
117  throw(ERROR_RVECTOR_ELEMENT_NOT_IN_VEC)
118 #else
119  throw()
120 #endif
121  {
122 #if(CXSC_INDEX_CHECK)
123  if(i<l||i>u) cxscthrow(ERROR_RVECTOR_ELEMENT_NOT_IN_VEC("real & rvector::operator [](const int &i)"));
124 #endif
125  return dat[i-l];
126  }
127 
128  INLINE real & rvector_slice::operator [](const int &i)
129 #if(CXSC_INDEX_CHECK)
130  throw(ERROR_RVECTOR_ELEMENT_NOT_IN_VEC)
131 #else
132  throw()
133 #endif
134  {
135 #if(CXSC_INDEX_CHECK)
136  if(i<start||i>end) cxscthrow(ERROR_RVECTOR_ELEMENT_NOT_IN_VEC("real & rvector_slice::operator [](const int &i)"));
137 #endif
138  return dat[i-l];
139  }
140 
141  INLINE real & rvector_slice::operator [](const int &i) const
142 #if(CXSC_INDEX_CHECK)
143  throw(ERROR_RVECTOR_ELEMENT_NOT_IN_VEC)
144 #else
145  throw()
146 #endif
147  {
148 #if(CXSC_INDEX_CHECK)
149  if(i<start||i>end) cxscthrow(ERROR_RVECTOR_ELEMENT_NOT_IN_VEC("real & rvector_slice::operator [](const int &i) const"));
150 #endif
151  return dat[i-l];
152  }
153 
154 
164  INLINE rvector_slice rvector::operator ()(const int &i)
165 #if(CXSC_INDEX_CHECK)
166  throw(ERROR_RVECTOR_SUB_ARRAY_TOO_BIG)
167 #else
168  throw()
169 #endif
170  {
171 #if(CXSC_INDEX_CHECK)
172  if(1<l||i>u) cxscthrow(ERROR_RVECTOR_SUB_ARRAY_TOO_BIG("rvector_slice rvector::operator ()(const int &i)"));
173 #endif
174  return rvector_slice(*this,1,i);
175  }
176 
187  INLINE rvector_slice rvector::operator ()(const int &i1,const int &i2)
188 #if(CXSC_INDEX_CHECK)
189  throw(ERROR_RVECTOR_SUB_ARRAY_TOO_BIG)
190 #else
191  throw()
192 #endif
193  {
194 #if(CXSC_INDEX_CHECK)
195  if(i1<l||i2>u) cxscthrow(ERROR_RVECTOR_SUB_ARRAY_TOO_BIG("rvector_slice rvector::operator ()(const int &i1,const int &i2)"));
196 #endif
197  return rvector_slice(*this,i1,i2);
198  }
199 
201 #if(CXSC_INDEX_CHECK)
202  throw(ERROR_RVECTOR_SUB_ARRAY_TOO_BIG)
203 #else
204  throw()
205 #endif
206  {
207 #if(CXSC_INDEX_CHECK)
208  if(1<start||i>end) cxscthrow(ERROR_RVECTOR_SUB_ARRAY_TOO_BIG("rvector_slice rvector_slice::operator ()(const int &i)"));
209 #endif
210  return rvector_slice(*this,1,i);
211  }
212 
213  INLINE rvector_slice rvector_slice::operator ()(const int &i1,const int &i2)
214 #if(CXSC_INDEX_CHECK)
215  throw(ERROR_RVECTOR_SUB_ARRAY_TOO_BIG)
216 #else
217  throw()
218 #endif
219  {
220 #if(CXSC_INDEX_CHECK)
221  if(i1<start||i2>end) cxscthrow(ERROR_RVECTOR_SUB_ARRAY_TOO_BIG("rvector_slice rvector_slice::operator ()(const int &i1,const int &i2)"));
222 #endif
223  return rvector_slice(*this,i1,i2);
224  }
225 
226  INLINE real::real(const rvector &rv)
227 #if(CXSC_INDEX_CHECK)
228  throw(ERROR_RVECTOR_TYPE_CAST_OF_THICK_OBJ,ERROR_RVECTOR_USE_OF_UNINITIALIZED_OBJ)
229 #else
230  throw()
231 #endif
232  {
233 #if(CXSC_INDEX_CHECK)
234  if(rv.size>1) cxscthrow(ERROR_RVECTOR_TYPE_CAST_OF_THICK_OBJ("real::real(const rvector &rv)"));
235  else if(rv.size<1) cxscthrow(ERROR_RVECTOR_USE_OF_UNINITIALIZED_OBJ("real::real(const rvector &rv)"));
236 #endif
237  *this=rv.dat[0];
238  }
239 
240  INLINE real::real(const rvector_slice &sl)
241 #if(CXSC_INDEX_CHECK)
242  throw(ERROR_RVECTOR_TYPE_CAST_OF_THICK_OBJ,ERROR_RVECTOR_USE_OF_UNINITIALIZED_OBJ)
243 #else
244  throw()
245 #endif
246  {
247 #if(CXSC_INDEX_CHECK)
248  if(sl.size>1) cxscthrow(ERROR_RVECTOR_TYPE_CAST_OF_THICK_OBJ("real::real(const rvector_slice &sl)"));
249  else if(sl.size<1) cxscthrow(ERROR_RVECTOR_USE_OF_UNINITIALIZED_OBJ("real::real(const rvector_slice &sl)"));
250 #endif
251  *this=sl.dat[sl.start-sl.l];
252  }
253 
254  INLINE rvector &rvector::operator =(const rvector &rv) throw() { return _vvassign<rvector,rvector,real>(*this,rv); }
255  INLINE rvector &rvector::operator =(const real &r) throw() { return _vsassign<rvector,real>(*this,r); }
256  INLINE rvector::operator void*() throw() { return _vvoid(*this); }
257 
259 #if(CXSC_INDEX_CHECK)
260  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
261 #else
262  throw()
263 #endif
264  { return _vsvsassign<rvector_slice,rvector_slice>(*this,sl); }
266 #if(CXSC_INDEX_CHECK)
267  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
268 #else
269  throw()
270 #endif
271  { return _vsvassign<rvector_slice,rvector>(*this,rv); }
272  INLINE rvector_slice & rvector_slice::operator =(const real &r) throw() { return _vssassign<rvector_slice,real>(*this,r); }
273  INLINE rvector_slice::operator void*() throw() { return _vsvoid(*this); }
274 
275 //======================== Vector Functions =============================
281  INLINE rvector _rvector(const real &r) throw() { return rvector(r); }
282 
283  INLINE void Resize(rvector &rv) throw() { _vresize(rv); }
284  INLINE void Resize(rvector &rv, const int &len)
285 #if(CXSC_INDEX_CHECK)
286  throw(ERROR__WRONG_BOUNDARIES<rvector>)
287 #else
288  throw()
289 #endif
290  { _vresize<class rvector,class real>(rv,len); }
291  INLINE void Resize(rvector &rv, const int &lb, const int &ub)
292 #if(CXSC_INDEX_CHECK)
293  throw(ERROR__WRONG_BOUNDARIES<rvector>)
294 #else
295  throw()
296 #endif
297  { _vresize<class rvector,class real>(rv,lb,ub); }
298 
299  INLINE rvector abs(const rvector &rv) throw() { return _vabs<rvector,rvector>(rv); }
300  INLINE rvector abs(const rvector_slice &sl) throw() { return _vsabs<rvector_slice,rvector>(sl); }
301  INLINE bool operator !(const rvector &rv) throw() { return _vnot(rv); }
302  INLINE bool operator !(const rvector_slice &sl) throw() { return _vsnot(sl); }
303 
304 //======================= Vector / Scalar ===============================
305 
306  INLINE rvector operator *(const rvector &rv, const real &s) throw() { return _vsmult<rvector,real,rvector>(rv,s); }
307  INLINE rvector operator *(const rvector_slice &sl, const real &s) throw() { return _vssmult<rvector_slice,real,rvector>(sl,s); }
308  INLINE rvector operator *(const real &s, const rvector &rv) throw() { return _vsmult<rvector,real,rvector>(rv,s); }
309  INLINE rvector operator *(const real &s, const rvector_slice &sl) throw() { return _vssmult<rvector_slice,real,rvector>(sl,s); }
310  INLINE rvector &operator *=(rvector &rv,const real &r) throw() { return _vsmultassign(rv,r); }
311  INLINE rvector_slice &rvector_slice::operator *=(const real &r) throw() { return _vssmultassign(*this,r); }
312 
313  INLINE rvector operator /(const rvector &rv, const real &s) throw() { return _vsdiv<rvector,real,rvector>(rv,s); }
314  INLINE rvector operator /(const rvector_slice &sl, const real &s) throw() { return _vssdiv<rvector_slice,real,rvector>(sl,s); }
315  INLINE rvector &operator /=(rvector &rv,const real &r) throw() { return _vsdivassign(rv,r); }
316  INLINE rvector_slice &rvector_slice::operator /=(const real &r) throw() { return _vssdivassign(*this,r); }
317 
318 //======================= Vector / Vector ===============================
319 
320  INLINE rvector &rvector::operator =(const rvector_slice &sl) throw() { return _vvsassign<rvector,rvector_slice,real>(*this,sl); }
321 
322 
323 
324  INLINE real operator *(const rvector & rv1, const rvector &rv2)
325 #if(CXSC_INDEX_CHECK)
326  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
327 #else
328  throw()
329 #endif
330  { return _vvmult<rvector,rvector,real>(rv1,rv2); }
331  INLINE real operator *(const rvector_slice &sl, const rvector &rv)
332 #if(CXSC_INDEX_CHECK)
333  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
334 #else
335  throw()
336 #endif
337  { return _vsvmult<rvector_slice,rvector,real>(sl,rv); }
338  INLINE real operator *(const rvector &rv, const rvector_slice &sl)
339 #if(CXSC_INDEX_CHECK)
340  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
341 #else
342  throw()
343 #endif
344  { return _vsvmult<rvector_slice,rvector,real>(sl,rv); }
345  INLINE real operator *(const rvector_slice & sl1, const rvector_slice &sl2)
346 #if(CXSC_INDEX_CHECK)
347  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
348 #else
349  throw()
350 #endif
351  { return _vsvsmult<rvector_slice,rvector_slice,real>(sl1,sl2); }
352 
353  INLINE const rvector &operator +(const rvector &rv) throw() { return rv; }
354  INLINE rvector operator +(const rvector_slice &sl) throw() { return sl; }
355  INLINE rvector operator +(const rvector &rv1, const rvector &rv2)
356 #if(CXSC_INDEX_CHECK)
357  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
358 #else
359  throw()
360 #endif
361  { return _vvplus<rvector,rvector,rvector>(rv1,rv2); }
362  INLINE rvector operator +(const rvector &rv, const rvector_slice &sl)
363 #if(CXSC_INDEX_CHECK)
364  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
365 #else
366  throw()
367 #endif
368  { return _vvsplus<rvector,rvector_slice,rvector>(rv,sl); }
369  INLINE rvector operator +(const rvector_slice &sl, const rvector &rv)
370 #if(CXSC_INDEX_CHECK)
371  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
372 #else
373  throw()
374 #endif
375  { return _vvsplus<rvector,rvector_slice,rvector>(rv,sl); }
376  INLINE rvector operator +(const rvector_slice &sl1, const rvector_slice &sl2)
377 #if(CXSC_INDEX_CHECK)
378  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
379 #else
380  throw()
381 #endif
382  { return _vsvsplus<rvector_slice,rvector_slice,rvector>(sl1,sl2); }
383  INLINE rvector & operator +=(rvector &rv1, const rvector &rv2)
384 #if(CXSC_INDEX_CHECK)
385  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
386 #else
387  throw()
388 #endif
389  { return _vvplusassign(rv1,rv2); }
390  INLINE rvector &operator +=(rvector &rv, const rvector_slice &sl)
391 #if(CXSC_INDEX_CHECK)
392  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
393 #else
394  throw()
395 #endif
396  { return _vvsplusassign(rv,sl); }
398 #if(CXSC_INDEX_CHECK)
399  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
400 #else
401  throw()
402 #endif
403  { return _vsvplusassign(*this,rv); }
405 #if(CXSC_INDEX_CHECK)
406  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
407 #else
408  throw()
409 #endif
410  { return _vsvsplusassign(*this,sl2); }
411 
412  INLINE rvector operator -(const rvector &rv) throw() { return _vminus(rv); }
413  INLINE rvector operator -(const rvector_slice &sl) throw() { return _vsminus<rvector_slice,rvector>(sl); }
414  INLINE rvector operator -(const rvector &rv1, const rvector &rv2)
415 #if(CXSC_INDEX_CHECK)
416  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
417 #else
418  throw()
419 #endif
420  { return _vvminus<rvector,rvector,rvector>(rv1,rv2); }
421  INLINE rvector operator -(const rvector &rv, const rvector_slice &sl)
422 #if(CXSC_INDEX_CHECK)
423  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
424 #else
425  throw()
426 #endif
427  { return _vvsminus<rvector,rvector_slice,rvector>(rv,sl); }
428  INLINE rvector operator -(const rvector_slice &sl, const rvector &rv)
429 #if(CXSC_INDEX_CHECK)
430  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
431 #else
432  throw()
433 #endif
434  { return _vsvminus<rvector_slice,rvector,rvector>(sl,rv); }
435  INLINE rvector operator -(const rvector_slice &sl1, const rvector_slice &sl2)
436 #if(CXSC_INDEX_CHECK)
437  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
438 #else
439  throw()
440 #endif
441  { return _vsvsminus<rvector_slice,rvector_slice,rvector>(sl1,sl2); }
442  INLINE rvector & operator -=(rvector &rv1, const rvector &rv2)
443 #if(CXSC_INDEX_CHECK)
444  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
445 #else
446  throw()
447 #endif
448  { return _vvminusassign(rv1,rv2); }
449  INLINE rvector &operator -=(rvector &rv, const rvector_slice &sl)
450 #if(CXSC_INDEX_CHECK)
451  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
452 #else
453  throw()
454 #endif
455  { return _vvsminusassign(rv,sl); }
457 #if(CXSC_INDEX_CHECK)
458  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
459 #else
460  throw()
461 #endif
462  { return _vsvminusassign(*this,rv); }
464 #if(CXSC_INDEX_CHECK)
465  throw(ERROR__OP_WITH_WRONG_DIM<rvector>)
466 #else
467  throw()
468 #endif
469  { return _vsvsminusassign(*this,sl2); }
470 
471  INLINE bool operator ==(const rvector &rv1, const rvector &rv2) throw() { return _vveq(rv1,rv2); }
472  INLINE bool operator ==(const rvector_slice &sl1, const rvector_slice &sl2) throw() { return _vsvseq(sl1,sl2); }
473  INLINE bool operator ==(const rvector_slice &sl, const rvector &rv) throw() { return _vsveq(sl,rv); }
474  INLINE bool operator ==(const rvector &rv, const rvector_slice &sl) throw() { return _vsveq(sl,rv); }
475  INLINE bool operator !=(const rvector &rv1, const rvector &rv2) throw() { return _vvneq(rv1,rv2); }
476  INLINE bool operator !=(const rvector_slice &sl1, const rvector_slice &sl2) throw() { return _vsvsneq(sl1,sl2); }
477  INLINE bool operator !=(const rvector_slice &sl, const rvector &rv) throw() { return _vsvneq(sl,rv); }
478  INLINE bool operator !=(const rvector &rv, const rvector_slice &sl) throw() { return _vsvneq(sl,rv); }
479  INLINE bool operator <(const rvector &rv1, const rvector &rv2) throw() { return _vvless(rv1,rv2); }
480  INLINE bool operator <(const rvector_slice &sl1, const rvector_slice &sl2) throw() { return _vsvsless(sl1,sl2); }
481  INLINE bool operator < (const rvector_slice &sl, const rvector &rv) throw() { return _vsvless(sl,rv); }
482  INLINE bool operator < (const rvector &rv, const rvector_slice &sl) throw() { return _vvsless(rv,sl); }
483  INLINE bool operator <=(const rvector &rv1, const rvector &rv2) throw() { return _vvleq(rv1,rv2); }
484  INLINE bool operator <=(const rvector_slice &sl1, const rvector_slice &sl2) throw() { return _vsvsleq(sl1,sl2); }
485  INLINE bool operator <=(const rvector_slice &sl, const rvector &rv) throw() { return _vsvleq(sl,rv); }
486  INLINE bool operator <=(const rvector &rv, const rvector_slice &sl) throw() { return _vvsleq(rv,sl); }
487  INLINE bool operator >(const rvector &rv1, const rvector &rv2) throw() { return _vvless(rv2,rv1); }
488  INLINE bool operator >(const rvector_slice &sl1, const rvector_slice &sl2) throw() { return _vsvsless(sl2,sl1); }
489  INLINE bool operator >(const rvector_slice &sl, const rvector &rv) throw() { return _vvsless(rv,sl); }
490  INLINE bool operator >(const rvector &rv, const rvector_slice &sl) throw() { return _vsvless(sl,rv); }
491  INLINE bool operator >=(const rvector &rv1, const rvector &rv2) throw() { return _vvleq(rv2,rv1); }
492  INLINE bool operator >=(const rvector_slice &sl1, const rvector_slice &sl2) throw() { return _vsvsleq(sl2,sl1); }
493  INLINE bool operator >=(const rvector_slice &sl, const rvector &rv) throw() { return _vvsleq(rv,sl); }
494  INLINE bool operator >=(const rvector &rv, const rvector_slice &sl) throw() { return _vsvleq(sl,rv); }
495 
496  INLINE std::ostream &operator <<(std::ostream &s, const rvector &rv) throw() { return _vout(s,rv); }
497  INLINE std::ostream &operator <<(std::ostream &o, const rvector_slice &sl) throw() { return _vsout(o,sl); }
498  INLINE std::istream &operator >>(std::istream &s, rvector &rv) throw() { return _vin(s,rv); }
499  INLINE std::istream &operator >>(std::istream &s, rvector_slice &rv) throw() { return _vsin(s,rv); }
500 
503  rvector x(*this);
504  for(int i=0 ; i<VecLen(x) ; i++)
505  x[i+Lb(x)] = (*this)[p[i+Lb(p)]+Lb(*this)];
506  return x;
507  }
508 
509 
510 
511 
512 } // namespace cxsc
513 
514 #endif
515 
cxsc::rvector_slice::operator=
rvector_slice & operator=(const rvector_slice &sl)
Implementation of standard assigning operator.
Definition: rvector.inl:258
cxsc::operator*=
cimatrix & operator*=(cimatrix &m, const cinterval &c)
Implementation of multiplication and allocation operation.
Definition: cimatrix.inl:1605
cxsc::rvector::operator=
rvector & operator=(const rvector &rv)
Implementation of standard assigning operator.
Definition: rvector.inl:254
cxsc::rvector::rvector
rvector()
Constructor of class rvector.
Definition: rvector.inl:37
cxsc::real::real
real(void)
Constructor of class real.
Definition: real.hpp:122
cxsc::intvector
The Data Type intvector.
Definition: intvector.hpp:52
cxsc::rvector_slice::operator[]
real & operator[](const int &i)
Operator for accessing the single elements of the vector.
Definition: rvector.inl:128
cxsc::rvector
The Data Type rvector.
Definition: rvector.hpp:58
cxsc::rvector_slice::operator+=
rvector_slice & operator+=(const rvector &rv)
Implementation of addition and allocation operation.
Definition: rvector.inl:397
cxsc::rvector_slice
The Data Type rvector_slice.
Definition: rvector.hpp:1064
cxsc::abs
ivector abs(const cimatrix_subv &mv)
Returns the absolute value of the matrix.
Definition: cimatrix.inl:737
cxsc::rvector_slice::operator-=
rvector_slice & operator-=(const rvector &rv)
Implementation of subtraction and allocation operation.
Definition: rvector.inl:456
cxsc::operator*
civector operator*(const cimatrix_subv &rv, const cinterval &s)
Implementation of multiplication operation.
Definition: cimatrix.inl:731
cxsc::rvector::operator[]
real & operator[](const int &i) const
Operator for accessing the single elements of the vector (read-only)
Definition: rvector.inl:102
cxsc::operator/=
cimatrix & operator/=(cimatrix &m, const cinterval &c)
Implementation of division and allocation operation.
Definition: cimatrix.inl:1623
cxsc
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
cxsc::Lb
int Lb(const cimatrix &rm, const int &i)
Returns the lower bound index.
Definition: cimatrix.inl:1156
cxsc::rvector_slice::operator/=
rvector_slice & operator/=(const real &r)
Implementation of division and allocation operation.
Definition: rvector.inl:316
cxsc::operator+=
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc)
Implementation of standard algebraic addition and allocation operation.
Definition: cdot.inl:251
cxsc::rvector_slice::operator()
rvector_slice & operator()()
Operator for accessing the whole vector.
Definition: rvector.hpp:1514
cxsc::Ub
int Ub(const cimatrix &rm, const int &i)
Returns the upper bound index.
Definition: cimatrix.inl:1163
cxsc::operator/
civector operator/(const cimatrix_subv &rv, const cinterval &s)
Implementation of division operation.
Definition: cimatrix.inl:730
cxsc::rvector::VecLen
friend int VecLen(const rvector &rv)
Returns the dimension of the vector.
Definition: rvector.hpp:1005
cxsc::rvector::Lb
friend int Lb(const rvector &rv)
Returns the lower bound of the vector.
Definition: rvector.hpp:1001
cxsc::rvector::operator()
rvector & operator()()
Operator for accessing the whole vector.
Definition: rvector.hpp:1027
cxsc::rvector_slice::operator*=
rvector_slice & operator*=(const real &r)
Implementation of multiplication and allocation operation.
Definition: rvector.inl:311
cxsc::VecLen
int VecLen(const scimatrix_subv &S)
Returns the length of the subvector.
Definition: scimatrix.hpp:9966
cxsc::Resize
void Resize(cimatrix &A)
Resizes the matrix.
Definition: cimatrix.inl:1211
cxsc::real
The Scalar Type real.
Definition: real.hpp:114
cxsc::_rvector
rvector _rvector(const real &r)
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
Definition: rvector.inl:281