26 #ifndef _CXSC_INTVECTOR_HPP_INCLUDED 27 #define _CXSC_INTVECTOR_HPP_INCLUDED 29 #include "xscclass.hpp" 43 class intvector_slice;
58 #ifdef _CXSC_FRIEND_TPL 59 template <
class V,
class MS,
class S>
friend void _vmsconstr(V &v,
const MS &m)
61 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<MS>);
65 template <
class V,
class M,
class S>
friend void _vmconstr(V &v,
const M &m)
67 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>);
71 template <
class V>
friend void _vresize(V &rv)
throw();
72 template <
class V,
class S>
friend void _vresize(V &rv,
const int &len)
74 throw(ERROR__WRONG_BOUNDARIES<V>);
78 template <
class V,
class S>
friend void _vresize(V &rv,
const int &lb,
const int &ub)
80 throw(ERROR__WRONG_BOUNDARIES<V>);
84 template <
class V1,
class V2,
class S>
friend V1 &_vvassign(V1 &rv1,
const V2 &rv2)
throw();
85 template <
class V,
class S>
friend V & _vsassign(V &rv,
const S &r)
throw();
86 template <
class V,
class VS,
class S>
friend V & _vvsassign(V &rv,
const VS &sl)
throw();
87 template <
class VS,
class V>
friend VS & _vsvassign(VS &sl,
const V &rv)
89 throw(ERROR__OP_WITH_WRONG_DIM<VS>);
93 template <
class V,
class M,
class S>
friend V &_vmassign(V &v,
const M &m)
95 throw(ERROR__TYPE_CAST_OF_THICK_OBJ<M>);
99 template <
class M,
class V,
class S>
friend M &_mvassign(M &m,
const V &v)
throw();
100 template <
class MV,
class V>
friend MV &_mvvassign(MV &v,
const V &rv)
101 #if(CXSC_INDEX_CHECK) 102 throw(ERROR__OP_WITH_WRONG_DIM<MV>);
106 template <
class MV,
class V>
friend V _mvabs(
const MV &mv)
throw();
109 template <
class DP,
class V1,
class V2>
friend void _vvaccu(DP &dp,
const V1 & rv1,
const V2 &rv2)
110 #if(CXSC_INDEX_CHECK) 111 throw(OP_WITH_WRONG_DIM);
115 template <
class DP,
class VS,
class V>
friend void _vsvaccu(DP &dp,
const VS & sl,
const V &rv)
116 #if(CXSC_INDEX_CHECK) 117 throw(OP_WITH_WRONG_DIM);
121 template <
class V,
class S>
friend V &_vsmultassign(V &rv,
const S &r)
throw();
122 template <
class VS,
class S>
friend VS &_vssmultassign(VS &rv,
const S &r)
throw();
123 template <
class VS,
class S>
friend VS &_vssdivassign(VS &rv,
const S &r)
throw();
124 template <
class V1,
class V2,
class E>
friend E _vvplus(
const V1 &rv1,
const V2 &rv2)
125 #if(CXSC_INDEX_CHECK) 126 throw(ERROR__OP_WITH_WRONG_DIM<V1>);
130 template <
class V,
class VS,
class E>
friend E _vvsplus(
const V &rv,
const VS &sl)
131 #if(CXSC_INDEX_CHECK) 132 throw(ERROR__OP_WITH_WRONG_DIM<V>);
136 template <
class VS1,
class VS2,
class E>
friend E _vsvsplus(
const VS1 &s1,
const VS2 &s2)
137 #if(CXSC_INDEX_CHECK) 138 throw(ERROR__OP_WITH_WRONG_DIM<VS1>);
142 template <
class VS1,
class VS2,
class E>
friend E _vsvsminus(
const VS1 &s1,
const VS2 &s2)
143 #if(CXSC_INDEX_CHECK) 144 throw(ERROR__OP_WITH_WRONG_DIM<VS1>);
148 template <
class V1,
class V2>
friend V1 &_vvplusassign(V1 &rv1,
const V2 &rv2)
149 #if(CXSC_INDEX_CHECK) 150 throw(ERROR__OP_WITH_WRONG_DIM<V1>);
154 template <
class V,
class VS>
friend V &_vvsplusassign(V &rv,
const VS &sl)
155 #if(CXSC_INDEX_CHECK) 156 throw(ERROR__OP_WITH_WRONG_DIM<V>);
160 template <
class VS,
class V>
friend VS &_vsvplusassign(VS &sl,
const V &rv)
161 #if(CXSC_INDEX_CHECK) 162 throw(ERROR__OP_WITH_WRONG_DIM<VS>);
166 template <
class VS1,
class VS2>
friend VS1 &_vsvsplusassign(VS1 &sl1,
const VS2 &sl2)
167 #if(CXSC_INDEX_CHECK) 168 throw(ERROR__OP_WITH_WRONG_DIM<VS1>);
172 template <
class VS1,
class VS2>
friend VS1 &_vsvsminusassign(VS1 &sl1,
const VS2 &sl2)
173 #if(CXSC_INDEX_CHECK) 174 throw(ERROR__OP_WITH_WRONG_DIM<VS1>);
178 template <
class V1,
class V2>
friend V1 &_vvminusassign(V1 &rv1,
const V2 &rv2)
179 #if(CXSC_INDEX_CHECK) 180 throw(ERROR__OP_WITH_WRONG_DIM<V1>);
184 template <
class V,
class VS>
friend V &_vvsminusassign(V &rv,
const VS &sl)
185 #if(CXSC_INDEX_CHECK) 186 throw(ERROR__OP_WITH_WRONG_DIM<V>);
190 template <
class VS,
class V>
friend VS &_vsvminusassign(VS &sl,
const V &rv)
191 #if(CXSC_INDEX_CHECK) 192 throw(ERROR__OP_WITH_WRONG_DIM<VS>);
196 template <
class V>
friend V _vminus(
const V &rv)
throw();
197 template <
class VS,
class V>
friend V _vsminus(
const VS &sl)
throw();
198 template <
class V1,
class V2,
class E>
friend E _vvminus(
const V1 &rv1,
const V2 &rv2)
199 #if(CXSC_INDEX_CHECK) 200 throw(ERROR__OP_WITH_WRONG_DIM<E>);
204 template <
class V,
class VS,
class E>
friend E _vvsminus(
const V &rv,
const VS &sl)
205 #if(CXSC_INDEX_CHECK) 206 throw(ERROR__OP_WITH_WRONG_DIM<E>);
210 template <
class VS,
class V,
class E>
friend E _vsvminus(
const VS &sl,
const V &rv)
211 #if(CXSC_INDEX_CHECK) 212 throw(ERROR__OP_WITH_WRONG_DIM<E>);
216 template <
class MV1,
class MV2,
class E>
friend E _mvmvplus(
const MV1 &rv1,
const MV2 &rv2)
217 #if(CXSC_INDEX_CHECK) 218 throw(ERROR__OP_WITH_WRONG_DIM<E>);
222 template <
class MV,
class V,
class E>
friend E _mvvplus(
const MV &rv1,
const V &rv2)
223 #if(CXSC_INDEX_CHECK) 224 throw(ERROR__OP_WITH_WRONG_DIM<E>);
228 template <
class MV,
class V,
class E>
friend E _mvvminus(
const MV &rv1,
const V &rv2)
229 #if(CXSC_INDEX_CHECK) 230 throw(ERROR__OP_WITH_WRONG_DIM<E>);
234 template <
class V,
class MV,
class E>
friend E _vmvminus(
const V &rv1,
const MV &rv2)
235 #if(CXSC_INDEX_CHECK) 236 throw(ERROR__OP_WITH_WRONG_DIM<E>);
240 template <
class MV1,
class MV2,
class E>
friend E _mvmvminus(
const MV1 &rv1,
const MV2 &rv2)
241 #if(CXSC_INDEX_CHECK) 242 throw(ERROR__OP_WITH_WRONG_DIM<E>);
246 template <
class MV,
class V>
friend MV &_mvvplusassign(MV &v,
const V &rv)
247 #if(CXSC_INDEX_CHECK) 248 throw(ERROR__OP_WITH_WRONG_DIM<MV>);
252 template <
class MV,
class V>
friend MV &_mvvminusassign(MV &v,
const V &rv)
253 #if(CXSC_INDEX_CHECK) 254 throw(ERROR__OP_WITH_WRONG_DIM<MV>);
260 template <
class DP,
class V,
class SV>
friend void _vmvaccu(DP &dp,
const V & rv1,
const SV &rv2)
261 #if(CXSC_INDEX_CHECK) 262 throw(OP_WITH_WRONG_DIM);
267 template <
class V,
class S,
class E>
friend E _vsdiv(
const V &rv,
const S &s)
throw();
268 template <
class V,
class S>
friend V &_vsdivassign(V &rv,
const S &r)
throw();
269 template <
class VS,
class S,
class E>
friend E _vssdiv(
const VS &sl,
const S &s)
throw();
270 template <
class MV,
class S,
class E>
friend E _mvsmult(
const MV &rv,
const S &s)
throw();
271 template <
class V,
class S,
class E>
friend E _vsmult(
const V &rv,
const S &s)
throw();
272 template <
class VS,
class S,
class E>
friend E _vssmult(
const VS &sl,
const S &s)
throw();
273 template <
class V1,
class V2>
friend bool _vveq(
const V1 &rv1,
const V2 &rv2)
throw();
274 template <
class VS,
class V>
friend bool _vsveq(
const VS &sl,
const V &rv)
throw();
275 template <
class V1,
class V2>
friend bool _vvneq(
const V1 &rv1,
const V2 &rv2)
throw();
276 template <
class VS,
class V>
friend bool _vsvneq(
const VS &sl,
const V &rv)
throw();
277 template <
class V1,
class V2>
friend bool _vvless(
const V1 &rv1,
const V2 &rv2)
throw();
278 template <
class VS,
class V>
friend bool _vsvless(
const VS &sl,
const V &rv)
throw();
279 template <
class V1,
class V2>
friend bool _vvleq(
const V1 &rv1,
const V2 &rv2)
throw();
280 template <
class VS,
class V>
friend bool _vsvleq(
const VS &sl,
const V &rv)
throw();
281 template <
class V,
class VS>
friend bool _vvsless(
const V &rv,
const VS &sl)
throw();
282 template <
class V,
class VS>
friend bool _vvsleq(
const V &rv,
const VS &sl)
throw();
283 template <
class V>
friend bool _vnot(
const V &rv)
throw();
284 template <
class V>
friend void *_vvoid(
const V &rv)
throw();
285 template <
class V,
class E>
friend E _vabs(
const V &rv)
throw();
286 template <
class VS,
class E>
friend E _vsabs(
const VS &sl)
throw();
287 template <
class VS1,
class VS2>
friend bool _vsvseq(
const VS1 &sl1,
const VS2 &sl2)
throw();
288 template <
class VS1,
class VS2>
friend bool _vsvsneq(
const VS1 &sl1,
const VS2 &sl2)
throw();
289 template <
class VS1,
class VS2>
friend bool _vsvsless(
const VS1 &sl1,
const VS2 &sl2)
throw();
290 template <
class VS1,
class VS2>
friend bool _vsvsleq(
const VS1 &sl1,
const VS2 &sl2)
throw();
291 template <
class VS>
friend bool _vsnot(
const VS &sl)
throw();
292 template <
class VS>
friend void *_vsvoid(
const VS &sl)
throw();
293 template <
class V>
friend std::ostream &_vout(std::ostream &s,
const V &rv)
throw();
294 template <
class V>
friend std::istream &_vin(std::istream &s, V &rv)
throw();
296 template <
class V,
class MV2,
class S>
friend V &_vmvassign(V &v,
const MV2 &rv)
throw();
297 template <
class MV,
class S,
class E>
friend E _mvsdiv(
const MV &rv,
const S &s)
throw();
310 explicit INLINE
intvector(
const class index &i)
throw();
313 explicit INLINE
intvector(
const int &i1,
const int &i2)
315 #if(CXSC_INDEX_CHECK) 316 throw(ERROR_INTVECTOR_WRONG_BOUNDARIES,ERROR_INTVECTOR_NO_MORE_MEMORY);
323 explicit INLINE
intvector(
const int &)
throw();
326 #if(CXSC_INDEX_CHECK) 327 throw(ERROR_INTMATRIX_TYPE_CAST_OF_THICK_OBJ);
333 #if(CXSC_INDEX_CHECK) 334 throw(ERROR_INTMATRIX_TYPE_CAST_OF_THICK_OBJ);
350 #if(CXSC_INDEX_CHECK) 351 throw(ERROR_INTMATRIX_TYPE_CAST_OF_THICK_OBJ);
357 #if(CXSC_INDEX_CHECK) 358 throw(ERROR_INTMATRIX_TYPE_CAST_OF_THICK_OBJ);
371 friend INLINE
int Lb(
const intvector &rv)
throw() {
return rv.l; }
373 friend INLINE
int Ub(
const intvector &rv)
throw() {
return rv.u; }
382 #if(CXSC_INDEX_CHECK) 383 throw(ERROR_INTVECTOR_ELEMENT_NOT_IN_VEC);
389 #if(CXSC_INDEX_CHECK) 390 throw(ERROR_INTVECTOR_ELEMENT_NOT_IN_VEC);
398 #if(CXSC_INDEX_CHECK) 399 throw(ERROR_INTVECTOR_SUB_ARRAY_TOO_BIG);
403 INLINE intvector_slice
operator ()(
const int &i1,
const int &i2)
405 #if(CXSC_INDEX_CHECK) 406 throw(ERROR_INTVECTOR_SUB_ARRAY_TOO_BIG);
411 INLINE
operator void*()
throw();
433 #ifdef _CXSC_FRIEND_TPL 435 template <
class VS1,
class VS2>
friend VS1 & _vsvsassign(VS1 &sl1,
const VS2 &sl2)
436 #if(CXSC_INDEX_CHECK) 437 throw(ERROR__OP_WITH_WRONG_DIM<VS1>);
441 template <
class V,
class VS,
class S>
friend V & _vvsassign(V &rv,
const VS &sl)
throw();
442 template <
class VS,
class V>
friend VS & _vsvassign(VS &sl,
const V &rv)
443 #if(CXSC_INDEX_CHECK) 444 throw(ERROR__OP_WITH_WRONG_DIM<VS>);
448 template <
class VS,
class S>
friend VS & _vssassign(VS &sl,
const S &r)
throw();
450 template <
class VS,
class S>
friend VS &_vssmultassign(VS &rv,
const S &r)
throw();
451 template <
class VS,
class S>
friend VS &_vssdivassign(VS &rv,
const S &r)
throw();
453 template <
class VS,
class V>
friend bool _vsveq(
const VS &sl,
const V &rv)
throw();
454 template <
class VS,
class V>
friend bool _vsvneq(
const VS &sl,
const V &rv)
throw();
455 template <
class VS,
class V>
friend bool _vsvless(
const VS &sl,
const V &rv)
throw();
456 template <
class VS,
class V>
friend bool _vsvleq(
const VS &sl,
const V &rv)
throw();
457 template <
class V,
class VS>
friend bool _vvsless(
const V &rv,
const VS &sl)
throw();
458 template <
class V,
class VS>
friend bool _vvsleq(
const V &rv,
const VS &sl)
throw();
459 template <
class VS,
class E>
friend E _vsabs(
const VS &sl)
throw();
460 template <
class VS1,
class VS2>
friend bool _vsvseq(
const VS1 &sl1,
const VS2 &sl2)
throw();
461 template <
class VS1,
class VS2>
friend bool _vsvsneq(
const VS1 &sl1,
const VS2 &sl2)
throw();
462 template <
class VS1,
class VS2>
friend bool _vsvsless(
const VS1 &sl1,
const VS2 &sl2)
throw();
463 template <
class VS1,
class VS2>
friend bool _vsvsleq(
const VS1 &sl1,
const VS2 &sl2)
throw();
464 template <
class VS>
friend bool _vsnot(
const VS &sl)
throw();
465 template <
class VS>
friend void *_vsvoid(
const VS &sl)
throw();
466 template <
class V>
friend std::ostream &_vsout(std::ostream &s,
const V &rv)
throw();
467 template <
class V>
friend std::istream &_vsin(std::istream &s, V &rv)
throw();
470 template <
class DP,
class VS,
class V>
friend void _vsvaccu(DP &dp,
const VS & sl,
const V &rv)
471 #if(CXSC_INDEX_CHECK) 472 throw(OP_WITH_WRONG_DIM);
476 template <
class DP,
class VS1,
class VS2>
friend void _vsvsaccu(DP &dp,
const VS1 & sl1,
const VS2 &sl2)
477 #if(CXSC_INDEX_CHECK) 478 throw(OP_WITH_WRONG_DIM);
482 template <
class VS,
class S,
class E>
friend E _vssdiv(
const VS &sl,
const S &s)
throw();
483 template <
class VS,
class S,
class E>
friend E _vssmult(
const VS &sl,
const S &s)
throw();
484 template <
class VS,
class V,
class E>
friend E _vsvmult(
const VS & sl,
const V &rv)
485 #if(CXSC_INDEX_CHECK) 486 throw(ERROR__OP_WITH_WRONG_DIM<V>);
490 template <
class V,
class VS,
class E>
friend E _vvsplus(
const V &rv,
const VS &sl)
491 #if(CXSC_INDEX_CHECK) 492 throw(ERROR__OP_WITH_WRONG_DIM<V>);
496 template <
class VS1,
class VS2,
class E>
friend E _vsvsplus(
const VS1 &s1,
const VS2 &s2)
497 #if(CXSC_INDEX_CHECK) 498 throw(ERROR__OP_WITH_WRONG_DIM<VS1>);
502 template <
class VS1,
class VS2,
class E>
friend E _vsvsminus(
const VS1 &s1,
const VS2 &s2)
503 #if(CXSC_INDEX_CHECK) 504 throw(ERROR__OP_WITH_WRONG_DIM<VS1>);
508 template <
class V,
class VS>
friend V &_vvsplusassign(V &rv,
const VS &sl)
509 #if(CXSC_INDEX_CHECK) 510 throw(ERROR__OP_WITH_WRONG_DIM<V>);
514 template <
class VS,
class V>
friend VS &_vsvplusassign(VS &sl,
const V &rv)
515 #if(CXSC_INDEX_CHECK) 516 throw(ERROR__OP_WITH_WRONG_DIM<VS>);
520 template <
class VS1,
class VS2>
friend VS1 &_vsvsplusassign(VS1 &sl1,
const VS2 &sl2)
521 #if(CXSC_INDEX_CHECK) 522 throw(ERROR__OP_WITH_WRONG_DIM<VS1>);
526 template <
class VS1,
class VS2>
friend VS1 &_vsvsminusassign(VS1 &sl1,
const VS2 &sl2)
527 #if(CXSC_INDEX_CHECK) 528 throw(ERROR__OP_WITH_WRONG_DIM<VS1>);
532 template <
class V,
class VS>
friend V &_vvsminusassign(V &rv,
const VS &sl)
533 #if(CXSC_INDEX_CHECK) 534 throw(ERROR__OP_WITH_WRONG_DIM<V>);
538 template <
class VS,
class V>
friend VS &_vsvminusassign(VS &sl,
const V &rv)
539 #if(CXSC_INDEX_CHECK) 540 throw(ERROR__OP_WITH_WRONG_DIM<VS>);
544 template <
class VS,
class V>
friend V _vsminus(
const VS &sl)
throw();
545 template <
class V,
class VS,
class E>
friend E _vvsminus(
const V &rv,
const VS &sl)
546 #if(CXSC_INDEX_CHECK) 547 throw(ERROR__OP_WITH_WRONG_DIM<E>);
551 template <
class VS,
class V,
class E>
friend E _vsvminus(
const VS &sl,
const V &rv)
552 #if(CXSC_INDEX_CHECK) 553 throw(ERROR__OP_WITH_WRONG_DIM<E>);
557 template <
class VS1,
class VS2,
class E>
friend E _vsvsmult(
const VS1 & sl1,
const VS2 &sl2)
558 #if(CXSC_INDEX_CHECK) 559 throw(ERROR__OP_WITH_WRONG_DIM<VS1>);
569 explicit INLINE
intvector_slice(
intvector &a,
const int &lb,
const int &ub)
throw():dat(a.dat),l(a.l),u(a.u),size(ub-lb+1),start(lb),end(ub) { }
578 #if(CXSC_INDEX_CHECK) 579 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
585 #if(CXSC_INDEX_CHECK) 586 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
594 #if(CXSC_INDEX_CHECK) 595 throw(ERROR__OP_WITH_WRONG_DIM<intvector>,ERROR_INTMATRIX_TYPE_CAST_OF_THICK_OBJ);
601 #if(CXSC_INDEX_CHECK) 602 throw(ERROR__OP_WITH_WRONG_DIM<intvector>,ERROR_INTMATRIX_TYPE_CAST_OF_THICK_OBJ);
619 #if(CXSC_INDEX_CHECK) 620 throw(ERROR_INTVECTOR_ELEMENT_NOT_IN_VEC);
626 #if(CXSC_INDEX_CHECK) 627 throw(ERROR_INTVECTOR_ELEMENT_NOT_IN_VEC);
635 #if(CXSC_INDEX_CHECK) 636 throw(ERROR_INTVECTOR_SUB_ARRAY_TOO_BIG);
642 #if(CXSC_INDEX_CHECK) 643 throw(ERROR_INTVECTOR_SUB_ARRAY_TOO_BIG);
654 #if(CXSC_INDEX_CHECK) 655 throw(ERROR_INTMATRIX_OP_WITH_WRONG_DIM);
661 #if(CXSC_INDEX_CHECK) 662 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
668 #if(CXSC_INDEX_CHECK) 669 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
675 #if(CXSC_INDEX_CHECK) 676 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
682 #if(CXSC_INDEX_CHECK) 683 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
687 INLINE
operator void*()
throw();
695 INLINE intvector
_intvector(
const int &r)
throw();
700 INLINE
void Resize(intvector &rv)
throw();
702 INLINE
void Resize(intvector &rv,
const int &len)
703 #if(CXSC_INDEX_CHECK) 704 throw(ERROR__WRONG_BOUNDARIES<intvector>);
708 INLINE
void Resize(intvector &rv,
const int &lb,
const int &ub)
710 #if(CXSC_INDEX_CHECK) 711 throw(ERROR__WRONG_BOUNDARIES<intvector>);
717 INLINE intvector
abs(
const intvector &rv)
throw();
719 INLINE intvector
abs(
const intvector_slice &sl)
throw();
721 INLINE
bool operator !(
const intvector &rv)
throw();
723 INLINE
bool operator !(
const intvector_slice &sl)
throw();
728 INLINE intvector
operator *(
const intvector &rv,
const int &s)
throw();
730 INLINE intvector
operator *(
const intvector_slice &sl,
const int &s)
throw();
732 INLINE intvector
operator *(
const int &s,
const intvector &rv)
throw();
734 INLINE intvector
operator *(
const int &s,
const intvector_slice &sl)
throw();
736 INLINE intvector &
operator *=(intvector &rv,
const int &r)
throw();
739 INLINE intvector
operator /(
const intvector &rv,
const int &s)
throw();
741 INLINE intvector
operator /(
const intvector_slice &sl,
const int &s)
throw();
743 INLINE intvector &
operator /=(intvector &rv,
const int &r)
throw();
750 INLINE
void accumulate(dotprecision &dp,
const intvector & rv1,
const intvector &rv2)
751 #if(CXSC_INDEX_CHECK) 752 throw(OP_WITH_WRONG_DIM);
756 INLINE
void accumulate(dotprecision &dp,
const intvector & rv1,
const intmatrix_subv &rv2)
758 #if(CXSC_INDEX_CHECK) 759 throw(OP_WITH_WRONG_DIM);
763 INLINE
void accumulate(dotprecision &dp,
const intmatrix_subv & rv1,
const intvector &rv2)
765 #if(CXSC_INDEX_CHECK) 766 throw(OP_WITH_WRONG_DIM);
770 INLINE
void accumulate(dotprecision &dp,
const intvector_slice &sl,
const intvector &rv)
772 #if(CXSC_INDEX_CHECK) 773 throw(OP_WITH_WRONG_DIM);
777 INLINE
void accumulate(dotprecision &dp,
const intvector &rv,
const intvector_slice &sl)
779 #if(CXSC_INDEX_CHECK) 780 throw(OP_WITH_WRONG_DIM);
784 INLINE
void accumulate(dotprecision &dp,
const intvector_slice & sl1,
const intvector_slice &sl2)
786 #if(CXSC_INDEX_CHECK) 787 throw(OP_WITH_WRONG_DIM);
794 INLINE
int operator *(
const intvector & rv1,
const intvector &rv2)
795 #if(CXSC_INDEX_CHECK) 796 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
800 INLINE
int operator *(
const intvector_slice &sl,
const intvector &rv)
802 #if(CXSC_INDEX_CHECK) 803 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
807 INLINE
int operator *(
const intvector &rv,
const intvector_slice &sl)
809 #if(CXSC_INDEX_CHECK) 810 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
814 INLINE
int operator *(
const intvector_slice & sl1,
const intvector_slice &sl2)
816 #if(CXSC_INDEX_CHECK) 817 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
823 INLINE
const intvector &operator +(
const intvector &rv)
throw();
825 INLINE intvector operator +(
const intvector_slice &sl)
throw();
827 INLINE intvector operator +(
const intvector &rv1,
const intvector &rv2)
828 #if(CXSC_INDEX_CHECK) 829 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
833 INLINE intvector operator +(
const intvector &rv,
const intvector_slice &sl)
835 #if(CXSC_INDEX_CHECK) 836 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
840 INLINE intvector operator +(
const intvector_slice &sl,
const intvector &rv)
842 #if(CXSC_INDEX_CHECK) 843 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
847 INLINE intvector operator +(
const intvector_slice &sl1,
const intvector_slice &sl2)
849 #if(CXSC_INDEX_CHECK) 850 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
854 INLINE intvector &
operator +=(intvector &rv1,
const intvector &rv2)
856 #if(CXSC_INDEX_CHECK) 857 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
861 INLINE intvector &
operator +=(intvector &rv,
const intvector_slice &sl)
863 #if(CXSC_INDEX_CHECK) 864 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
870 INLINE intvector operator -(
const intvector &rv)
throw();
872 INLINE intvector operator -(
const intvector_slice &sl)
throw();
874 INLINE intvector operator -(
const intvector &rv1,
const intvector &rv2)
875 #if(CXSC_INDEX_CHECK) 876 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
880 INLINE intvector operator -(
const intvector &rv,
const intvector_slice &sl)
882 #if(CXSC_INDEX_CHECK) 883 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
887 INLINE intvector operator -(
const intvector_slice &sl,
const intvector &rv)
889 #if(CXSC_INDEX_CHECK) 890 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
894 INLINE intvector operator -(
const intvector_slice &sl1,
const intvector_slice &sl2)
896 #if(CXSC_INDEX_CHECK) 897 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
901 INLINE intvector & operator -=(intvector &rv1,
const intvector &rv2)
903 #if(CXSC_INDEX_CHECK) 904 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
908 INLINE intvector &operator -=(intvector &rv,
const intvector_slice &sl)
910 #if(CXSC_INDEX_CHECK) 911 throw(ERROR__OP_WITH_WRONG_DIM<intvector>);
917 INLINE
bool operator ==(
const intvector &rv1,
const intvector &rv2)
throw();
919 INLINE
bool operator ==(
const intvector_slice &sl1,
const intvector_slice &sl2)
throw();
921 INLINE
bool operator ==(
const intvector_slice &sl,
const intvector &rv)
throw();
923 INLINE
bool operator ==(
const intvector &rv,
const intvector_slice &sl)
throw();
925 INLINE
bool operator !=(
const intvector &rv1,
const intvector &rv2)
throw();
927 INLINE
bool operator !=(
const intvector_slice &sl1,
const intvector_slice &sl2)
throw();
929 INLINE
bool operator !=(
const intvector_slice &sl,
const intvector &rv)
throw();
931 INLINE
bool operator !=(
const intvector &rv,
const intvector_slice &sl)
throw();
933 INLINE
bool operator <(
const intvector &rv1,
const intvector &rv2)
throw();
935 INLINE
bool operator <(
const intvector_slice &sl1,
const intvector_slice &sl2)
throw();
937 INLINE
bool operator < (
const intvector_slice &sl,
const intvector &rv)
throw();
939 INLINE
bool operator < (
const intvector &rv,
const intvector_slice &sl)
throw();
941 INLINE
bool operator <=(
const intvector &rv1,
const intvector &rv2)
throw();
943 INLINE
bool operator <=(
const intvector_slice &sl1,
const intvector_slice &sl2)
throw();
945 INLINE
bool operator <=(
const intvector_slice &sl,
const intvector &rv)
throw();
947 INLINE
bool operator <=(
const intvector &rv,
const intvector_slice &sl)
throw();
949 INLINE
bool operator >(
const intvector &rv1,
const intvector &rv2)
throw();
951 INLINE
bool operator >(
const intvector_slice &sl1,
const intvector_slice &sl2)
throw();
953 INLINE
bool operator >(
const intvector_slice &sl,
const intvector &rv)
throw();
955 INLINE
bool operator >(
const intvector &rv,
const intvector_slice &sl)
throw();
957 INLINE
bool operator >=(
const intvector &rv1,
const intvector &rv2)
throw();
959 INLINE
bool operator >=(
const intvector_slice &sl1,
const intvector_slice &sl2)
throw();
961 INLINE
bool operator >=(
const intvector_slice &sl,
const intvector &rv)
throw();
963 INLINE
bool operator >=(
const intvector &rv,
const intvector_slice &sl)
throw();
966 INLINE std::ostream &operator <<(std::ostream &s,
const intvector &rv)
throw();
968 INLINE std::ostream &operator <<(std::ostream &o,
const intvector_slice &sl)
throw();
970 INLINE std::istream &operator >>(std::istream &s, intvector &rv)
throw();
972 INLINE std::istream &operator >>(std::istream &s, intvector_slice &rv)
throw();
975 INLINE intvector perminv(
const intvector&);
979 extern std::ostream& operator<< ( std::ostream&, intvector& );
985 #ifdef _CXSC_INCL_INL 986 #include "intvector.inl" 987 #include "vector.inl" intvector & operator()()
Operator for accessing the whole vector.
cimatrix & operator/=(cimatrix &m, const cinterval &c)
Implementation of division and allocation operation.
intvector_slice & operator -=(const intvector &rv)
Implementation of subtraction and allocation operation.
friend intvector & SetUb(intvector &rv, const int &u)
Sets the upper bound of the vector.
friend int VecLen(const intvector_slice &sl)
Returns the dimension of the vector.
The namespace cxsc, providing all functionality of the class library C-XSC.
The Data Type intmatrix_subv.
intvector_slice(const intvector_slice &a)
Constructor of class intvector_slice.
intvector_slice & operator()()
Operator for accessing the whole vector.
intvector_slice(intvector_slice &a, const int &lb, const int &ub)
Constructor of class intvector_slice.
void DoubleSize(cimatrix &A)
Doubles the size of the matrix.
friend int Ub(const intvector &rv)
Returns the upper bound of the vector.
friend intvector & SetLb(intvector &rv, const int &l)
Sets the lower bound of the vector.
int & operator [](const int &i)
Operator for accessing the single elements of the vector.
cimatrix & operator *=(cimatrix &m, const cinterval &c)
Implementation of multiplication and allocation operation.
friend int VecLen(const intvector &rv)
Returns the dimension of the vector.
friend int Ub(const intvector_slice &sl)
Returns the upper bound of the vector.
int & operator [](const int &i)
Operator for accessing the single elements of the vector.
intvector_slice & operator *=(const int &r)
Implementation of multiplication and allocation operation.
civector operator *(const cimatrix_subv &rv, const cinterval &s)
Implementation of multiplication operation.
void Resize(cimatrix &A)
Resizes the matrix.
intvector_slice & operator+=(const intvector &rv)
Implementation of addition and allocation operation.
friend int Lb(const intvector &rv)
Returns the lower bound of the vector.
The Data Type intvector_slice.
The Data Type intmatrix_slice.
intvector _intvector(const int &r)
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
intvector_slice & operator/=(const int &r)
Implementation of division and allocation operation.
cdotprecision & operator+=(cdotprecision &cd, const l_complex &lc)
Implementation of standard algebraic addition and allocation operation.
intvector_slice(intvector &a, const int &lb, const int &ub)
Constructor of class intvector_slice.
intvector()
Constructor of class intvector.
civector operator/(const cimatrix_subv &rv, const cinterval &s)
Implementation of division operation.
intvector_slice & operator=(const intvector_slice &sl)
Constructor of class intvector_slice.
friend int Lb(const intvector_slice &sl)
Returns the lower bound of the vector.
intvector & operator=(const intvector &rv)
Implementation of standard assigning operator.
ivector abs(const cimatrix_subv &mv)
Returns the absolute value of the matrix.