C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
livecimat.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: livecimat.inl,v 1.25 2014/01/30 17:23:47 cxsc Exp $ */
25 
26 // Here are definitions for l_ivector x imatrix-Functions
27 #ifndef _CXSC_LIVECIMAT_INL_INCLUDED
28 #define _CXSC_LIVECIMAT_INL_INCLUDED
29 
30 namespace cxsc {
31 
32  INLINE l_ivector::l_ivector(const imatrix &sl)
33 #if(CXSC_INDEX_CHECK)
34  throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
35 #else
36  throw()
37 #endif
38  { _vmconstr<l_ivector,imatrix,l_interval>(*this,sl); }
40 #if(CXSC_INDEX_CHECK)
41  throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
42 #else
43  throw()
44 #endif
45  { _vmsconstr<l_ivector,imatrix_slice,l_interval>(*this,sl); }
46  INLINE l_ivector::l_ivector(const imatrix_subv &v) throw():l(v.lb),u(v.ub),size(v.size)
47  {
48  dat=new l_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 l_ivector _l_ivector(const imatrix &sl)
58 #if(CXSC_INDEX_CHECK)
59  throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
60 #else
61  throw()
62 #endif
63  { return l_ivector(sl); }
70 #if(CXSC_INDEX_CHECK)
71  throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
72 #else
73  throw()
74 #endif
75  { return l_ivector(sl); }
76 
77  INLINE void accumulate(idotprecision &dp, const imatrix_subv & rv1, const l_ivector &rv2)
78 #if(CXSC_INDEX_CHECK)
79  throw(OP_WITH_WRONG_DIM)
80 #else
81  throw()
82 #endif
83  { _vmvaccu<idotprecision,l_ivector,imatrix_subv>(dp,rv2,rv1); }
84  INLINE void accumulate(idotprecision &dp, const l_ivector & rv1, const imatrix_subv &rv2)
85 #if(CXSC_INDEX_CHECK)
86  throw(OP_WITH_WRONG_DIM)
87 #else
88  throw()
89 #endif
90  { _vmvaccu<idotprecision,l_ivector,imatrix_subv>(dp,rv1,rv2); }
91 
92  INLINE void accumulate(idotprecision &dp, const imatrix_subv & rv1, const l_ivector_slice &rv2)
93 #if(CXSC_INDEX_CHECK)
94  throw(OP_WITH_WRONG_DIM)
95 #else
96  throw()
97 #endif
98  { _vmvaccu<idotprecision,l_ivector,imatrix_subv>(dp,l_ivector(rv2),rv1); }
99  INLINE void accumulate(idotprecision &dp, const l_ivector_slice & rv1, const imatrix_subv &rv2)
100 #if(CXSC_INDEX_CHECK)
101  throw(OP_WITH_WRONG_DIM)
102 #else
103  throw()
104 #endif
105  { _vmvaccu<idotprecision,l_ivector,imatrix_subv>(dp,l_ivector(rv1),rv2); }
106 
107  INLINE l_ivector &l_ivector::operator =(const imatrix_subv &mv) throw() { return _vmvassign<l_ivector,imatrix_subv,l_interval>(*this,mv); }
108  INLINE l_ivector_slice &l_ivector_slice::operator =(const imatrix_subv &mv) throw() { return _vsvassign(*this,ivector(mv)); }
110 #if(CXSC_INDEX_CHECK)
111  throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
112 #else
113  throw()
114 #endif
115  { return _vmassign<l_ivector,imatrix,l_interval>(*this,m); }
117 #if(CXSC_INDEX_CHECK)
118  throw(ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
119 #else
120  throw()
121 #endif
122  { return _vmassign<l_ivector,imatrix,l_interval>(*this,imatrix(m)); }
124 #if(CXSC_INDEX_CHECK)
125  throw(ERROR__OP_WITH_WRONG_DIM<ivector>,ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
126 #else
127  throw()
128 #endif
129  { return _vsvassign(*this,ivector(m)); }
131 #if(CXSC_INDEX_CHECK)
132  throw(ERROR__OP_WITH_WRONG_DIM<ivector>,ERROR_IMATRIX_TYPE_CAST_OF_THICK_OBJ)
133 #else
134  throw()
135 #endif
136  { return _vsvassign(*this,l_ivector(imatrix(m))); }
137 
138  INLINE l_ivector operator *(const imatrix &m,const l_ivector &v)
139 #if(CXSC_INDEX_CHECK)
140  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
141 #else
142  throw()
143 #endif
144  { return _mvlimult<imatrix,l_ivector,l_ivector>(m,v); }
145  INLINE l_ivector operator *(const imatrix_slice &ms,const l_ivector &v)
146 #if(CXSC_INDEX_CHECK)
147  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
148 #else
149  throw()
150 #endif
151  { return _msvlimult<imatrix_slice,l_ivector,l_ivector>(ms,v); }
152  INLINE l_ivector operator *(const l_ivector &v,const imatrix &m)
153 #if(CXSC_INDEX_CHECK)
154  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
155 #else
156  throw()
157 #endif
158  { return _vmlimult<l_ivector,imatrix,l_ivector>(v,m); }
159  INLINE l_ivector operator *(const l_ivector &v,const imatrix_slice &ms)
160 #if(CXSC_INDEX_CHECK)
161  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
162 #else
163  throw()
164 #endif
165  { return _vmslimult<l_ivector,imatrix_slice,l_ivector>(v,ms); }
166  INLINE l_ivector &operator *=(l_ivector &v,const imatrix &m)
167 #if(CXSC_INDEX_CHECK)
168  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
169 #else
170  throw()
171 #endif
172  { return _vmlimultassign<l_ivector,imatrix,l_interval>(v,m); }
174 #if(CXSC_INDEX_CHECK)
175  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
176 #else
177  throw()
178 #endif
179  { return _vmslimultassign<l_ivector,imatrix_slice,l_interval>(v,ms); }
180 
181  INLINE l_ivector operator *(const l_ivector_slice &v,const imatrix &m)
182 #if(CXSC_INDEX_CHECK)
183  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
184 #else
185  throw()
186 #endif
187  { return _vmlimult<l_ivector,imatrix,l_ivector>(l_ivector(v),m); }
189 #if(CXSC_INDEX_CHECK)
190  throw(ERROR_IMATRIX_OP_WITH_WRONG_DIM)
191 #else
192  throw()
193 #endif
194  { return _vsmlimultassign<l_ivector_slice,imatrix,l_interval>(*this,m); }
195 
196  INLINE l_ivector operator *(const l_rvector &v,const imatrix &m)
197 #if(CXSC_INDEX_CHECK)
198  throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
199 #else
200  throw()
201 #endif
202  { return _vmlimult<l_rvector,imatrix,l_ivector>(v,m); }
203  INLINE l_ivector operator *(const l_rvector &v,const imatrix_slice &ms)
204 #if(CXSC_INDEX_CHECK)
205  throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
206 #else
207  throw()
208 #endif
209  { return _vmslimult<l_rvector,imatrix_slice,l_ivector>(v,ms); }
210  INLINE l_ivector operator *(const l_rvector_slice &v,const imatrix &m)
211 #if(CXSC_INDEX_CHECK)
212  throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
213 #else
214  throw()
215 #endif
216  { return _vmlimult<l_ivector,imatrix,l_ivector>(l_ivector(v),m); }
217  INLINE l_ivector operator *(const imatrix &m,const l_rvector &v)
218 #if(CXSC_INDEX_CHECK)
219  throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
220 #else
221  throw()
222 #endif
223  { return _mvlimult<imatrix,l_rvector,l_ivector>(m,v); }
224  INLINE l_ivector operator *(const imatrix_slice &ms,const l_rvector &v)
225 #if(CXSC_INDEX_CHECK)
226  throw(ERROR_LIMATRIX_OP_WITH_WRONG_DIM)
227 #else
228  throw()
229 #endif
230  { return _msvlimult<imatrix_slice,l_rvector,l_ivector>(ms,v); }
231 
232 } // namespace cxsc
233 
234 #endif
235 
The Multiple-Precision Data Type l_interval.
Definition: l_interval.hpp:71
The Data Type imatrix_subv.
Definition: imatrix.hpp:55
The Data Type idotprecision.
Definition: idot.hpp:47
l_ivector & operator=(const l_ivector &rv)
Implementation of standard assigning operator.
Definition: l_ivector.inl:311
The Multiple-Precision Data Type l_ivector_slice.
Definition: l_ivector.hpp:870
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
l_ivector()
Constructor of class l_ivector.
Definition: l_ivector.inl:31
l_ivector_slice & operator *=(const l_interval &r)
Implementation of multiplication and allocation operation.
Definition: l_ivector.inl:497
The Multiple-Precision Data Type l_ivector.
Definition: l_ivector.hpp:54
cimatrix & operator *=(cimatrix &m, const cinterval &c)
Implementation of multiplication and allocation operation.
Definition: cimatrix.inl:1605
The Data Type imatrix_slice.
Definition: imatrix.hpp:1441
l_ivector _l_ivector(const l_interval &r)
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
Definition: l_ivector.inl:252
civector operator *(const cimatrix_subv &rv, const cinterval &s)
Implementation of multiplication operation.
Definition: cimatrix.inl:731
The Data Type ivector.
Definition: ivector.hpp:54
l_ivector_slice & operator=(const l_ivector_slice &sl)
Implementation of standard assigning operator.
Definition: l_ivector.inl:314
The Multiple-Precision Data Type l_rvector.
Definition: l_rvector.hpp:53
The Data Type imatrix.
Definition: imatrix.hpp:659
The Multiple-Precision Data Type l_rvector_slice.
Definition: l_rvector.hpp:744