C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
ivecrmat.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: ivecrmat.inl,v 1.26 2014/01/30 17:23:45 cxsc Exp $ */
25 
26 // Here are definitions for ivector x rmatrix-Functions
27 #ifndef _CXSC_IVECRMAT_INL_INCLUDED
28 #define _CXSC_IVECRMAT_INL_INCLUDED
29 
30 namespace cxsc {
31 
32  INLINE ivector::ivector(const rmatrix &sl)
33 #if(CXSC_INDEX_CHECK)
34  throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
35 #else
36  throw()
37 #endif
38  { _vmconstr<ivector,rmatrix,interval>(*this,sl); }
39  INLINE ivector::ivector(const rmatrix_slice &sl)
40 #if(CXSC_INDEX_CHECK)
41  throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
42 #else
43  throw()
44 #endif
45  { _vmsconstr<ivector,rmatrix_slice,interval>(*this,sl); }
46  INLINE ivector::ivector(const rmatrix_subv &v) throw():l(v.lb),u(v.ub),size(v.size)
47  {
48  dat=new interval[size];
49  for (int i=0, j=v.start;i<v.size;i++,j+=v.offset)
50  dat[i]=v.dat[j];
51  }
57  INLINE ivector _ivector(const rmatrix &sl)
58 #if(CXSC_INDEX_CHECK)
59  throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
60 #else
61  throw()
62 #endif
63  { return ivector(sl); }
69  INLINE ivector _ivector(const rmatrix_slice &sl)
70 #if(CXSC_INDEX_CHECK)
71  throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
72 #else
73  throw()
74 #endif
75  { return ivector(sl); }
76 
77 
78  INLINE void SetInf(ivector &iv,const rmatrix_subv &rv)
79 #if(CXSC_INDEX_CHECK)
80  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
81 #else
82  throw()
83 #endif
84  { _vmvsetinf(iv,rv); }
85  INLINE void SetSup(ivector &iv,const rmatrix_subv &rv)
86 #if(CXSC_INDEX_CHECK)
87  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
88 #else
89  throw()
90 #endif
91  { _vmvsetsup(iv,rv); }
92  INLINE void SetInf(ivector_slice &iv,const rmatrix_subv &rv)
93 #if(CXSC_INDEX_CHECK)
94  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
95 #else
96  throw()
97 #endif
98  { _vsvsetinf(iv,rvector(rv)); }
99  INLINE void SetSup(ivector_slice &iv,const rmatrix_subv &rv)
100 #if(CXSC_INDEX_CHECK)
101  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
102 #else
103  throw()
104 #endif
105  { _vsvsetsup(iv,rvector(rv)); }
106 
107  INLINE void UncheckedSetInf(ivector &iv,const rmatrix_subv &rv)
108 #if(CXSC_INDEX_CHECK)
109  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
110 #else
111  throw()
112 #endif
113  { _vmvusetinf(iv,rv); }
114  INLINE void UncheckedSetSup(ivector &iv,const rmatrix_subv &rv)
115 #if(CXSC_INDEX_CHECK)
116  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
117 #else
118  throw()
119 #endif
120  { _vmvusetsup(iv,rv); }
121  INLINE void UncheckedSetInf(ivector_slice &iv,const rmatrix_subv &rv)
122 #if(CXSC_INDEX_CHECK)
123  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
124 #else
125  throw()
126 #endif
127  { _vsvusetinf(iv,rvector(rv)); }
128  INLINE void UncheckedSetSup(ivector_slice &iv,const rmatrix_subv &rv)
129 #if(CXSC_INDEX_CHECK)
130  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
131 #else
132  throw()
133 #endif
134  { _vsvusetsup(iv,rvector(rv)); }
135 
136  INLINE ivector &ivector::operator =(const rmatrix_subv &mv) throw() { return _vmvassign<ivector,rmatrix_subv,interval>(*this,mv); }
137  INLINE ivector_slice &ivector_slice::operator =(const rmatrix_subv &mv) throw() { return _vsvassign(*this,rvector(mv)); }
139 #if(CXSC_INDEX_CHECK)
140  throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
141 #else
142  throw()
143 #endif
144  { return _vmassign<ivector,rmatrix,interval>(*this,m); }
146 #if(CXSC_INDEX_CHECK)
147  throw(ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
148 #else
149  throw()
150 #endif
151  { return _vmassign<ivector,rmatrix,interval>(*this,rmatrix(m)); }
153 #if(CXSC_INDEX_CHECK)
154  throw(ERROR__OP_WITH_WRONG_DIM<rvector>,ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
155 #else
156  throw()
157 #endif
158  { return _vsvassign(*this,rvector(m)); }
160 #if(CXSC_INDEX_CHECK)
161  throw(ERROR__OP_WITH_WRONG_DIM<rvector>,ERROR_RMATRIX_TYPE_CAST_OF_THICK_OBJ)
162 #else
163  throw()
164 #endif
165  { return _vsvassign(*this,ivector(rmatrix(m))); }
166 
167  INLINE ivector operator *(const rmatrix &m,const ivector &v)
168 #if(CXSC_INDEX_CHECK)
169  throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
170 #else
171  throw()
172 #endif
173  { return _mvimult<rmatrix,ivector,ivector>(m,v); }
174  INLINE ivector operator *(const rmatrix_slice &ms,const ivector &v)
175 #if(CXSC_INDEX_CHECK)
176  throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
177 #else
178  throw()
179 #endif
180  { return _msvimult<rmatrix_slice,ivector,ivector>(ms,v); }
181  INLINE ivector operator *(const ivector &v,const rmatrix &m)
182 #if(CXSC_INDEX_CHECK)
183  throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
184 #else
185  throw()
186 #endif
187  { return _vmimult<ivector,rmatrix,ivector>(v,m); }
188  INLINE ivector operator *(const ivector &v,const rmatrix_slice &ms)
189 #if(CXSC_INDEX_CHECK)
190  throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
191 #else
192  throw()
193 #endif
194  { return _vmsimult<ivector,rmatrix_slice,ivector>(v,ms); }
195  INLINE ivector &operator *=(ivector &v,const rmatrix &m)
196 #if(CXSC_INDEX_CHECK)
197  throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
198 #else
199  throw()
200 #endif
201  { return _vmimultassign<ivector,rmatrix,interval>(v,m); }
202  INLINE ivector &operator *=(ivector &v,const rmatrix_slice &ms)
203 #if(CXSC_INDEX_CHECK)
204  throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
205 #else
206  throw()
207 #endif
208  { return _vmsimultassign<ivector,rmatrix_slice,interval>(v,ms); }
209 
210  INLINE ivector operator *(const ivector_slice &v,const rmatrix &m)
211 #if(CXSC_INDEX_CHECK)
212  throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
213 #else
214  throw()
215 #endif
216  { return _vmimult<ivector,rmatrix,ivector>(ivector(v),m); }
218 #if(CXSC_INDEX_CHECK)
219  throw(ERROR_RMATRIX_OP_WITH_WRONG_DIM)
220 #else
221  throw()
222 #endif
223  { return _vsmimultassign<ivector_slice,rmatrix,interval>(*this,m); }
224 
225 } // namespace cxsc
226 
227 #endif
228 
The Data Type rmatrix_slice.
Definition: rmatrix.hpp:1442
ivector_slice & operator*=(const interval &r)
Implementation of multiplication and allocation operation.
Definition: ivector.inl:496
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
civector operator*(const cimatrix_subv &rv, const cinterval &s)
Implementation of multiplication operation.
Definition: cimatrix.inl:731
The Scalar Type interval.
Definition: interval.hpp:54
The Data Type ivector_slice.
Definition: ivector.hpp:962
The Data Type rmatrix_subv.
Definition: rmatrix.hpp:53
The Data Type rvector.
Definition: rvector.hpp:57
The Data Type rmatrix.
Definition: rmatrix.hpp:470
The Data Type ivector.
Definition: ivector.hpp:54
ivector & operator=(const ivector &rv)
Implementation of standard assigning operator.
Definition: ivector.inl:263
INLINE ivector _ivector(const rmatrix &sl)
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
Definition: ivecrmat.inl:57
ivector_slice & operator=(const sivector &sl)
Implementation of standard assigning operator.
Definition: sivector.hpp:2194
cimatrix & operator*=(cimatrix &m, const cinterval &c)
Implementation of multiplication and allocation operation.
Definition: cimatrix.inl:1605
ivector()
Constructor of class ivector.
Definition: ivector.inl:31