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
30namespace cxsc {
31
32 INLINE l_ivector::l_ivector(const imatrix &sl)
33#if(CXSC_INDEX_CHECK)
34
35#else
36 noexcept
37#endif
38 { _vmconstr<l_ivector,imatrix,l_interval>(*this,sl); }
40#if(CXSC_INDEX_CHECK)
41
42#else
43 noexcept
44#endif
45 { _vmsconstr<l_ivector,imatrix_slice,l_interval>(*this,sl); }
46 INLINE l_ivector::l_ivector(const imatrix_subv &v) noexcept: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
60#else
61 noexcept
62#endif
63 { return l_ivector(sl); }
70#if(CXSC_INDEX_CHECK)
71
72#else
73 noexcept
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
80#else
81 noexcept
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
87#else
88 noexcept
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
95#else
96 noexcept
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
102#else
103 noexcept
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) noexcept { return _vmvassign<l_ivector,imatrix_subv,l_interval>(*this,mv); }
108 INLINE l_ivector_slice &l_ivector_slice::operator =(const imatrix_subv &mv) noexcept { return _vsvassign(*this,ivector(mv)); }
110#if(CXSC_INDEX_CHECK)
111
112#else
113 noexcept
114#endif
115 { return _vmassign<l_ivector,imatrix,l_interval>(*this,m); }
117#if(CXSC_INDEX_CHECK)
118
119#else
120 noexcept
121#endif
122 { return _vmassign<l_ivector,imatrix,l_interval>(*this,imatrix(m)); }
124#if(CXSC_INDEX_CHECK)
125
126#else
127 noexcept
128#endif
129 { return _vsvassign(*this,ivector(m)); }
131#if(CXSC_INDEX_CHECK)
132
133#else
134 noexcept
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
141#else
142 noexcept
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
148#else
149 noexcept
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
155#else
156 noexcept
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
162#else
163 noexcept
164#endif
165 { return _vmslimult<l_ivector,imatrix_slice,l_ivector>(v,ms); }
167#if(CXSC_INDEX_CHECK)
168
169#else
170 noexcept
171#endif
172 { return _vmlimultassign<l_ivector,imatrix,l_interval>(v,m); }
174#if(CXSC_INDEX_CHECK)
175
176#else
177 noexcept
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
184#else
185 noexcept
186#endif
187 { return _vmlimult<l_ivector,imatrix,l_ivector>(l_ivector(v),m); }
189#if(CXSC_INDEX_CHECK)
190
191#else
192 noexcept
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
199#else
200 noexcept
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
206#else
207 noexcept
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
213#else
214 noexcept
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
220#else
221 noexcept
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
227#else
228 noexcept
229#endif
230 { return _msvlimult<imatrix_slice,l_rvector,l_ivector>(ms,v); }
231
232} // namespace cxsc
233
234#endif
235
The Data Type idotprecision.
Definition idot.hpp:48
The Data Type imatrix_slice.
Definition imatrix.hpp:1442
The Data Type imatrix_subv.
Definition imatrix.hpp:56
The Data Type imatrix.
Definition imatrix.hpp:660
The Data Type ivector.
Definition ivector.hpp:55
The Multiple-Precision Data Type l_interval.
The Multiple-Precision Data Type l_ivector_slice.
l_ivector_slice & operator=(const l_ivector_slice &sl) noexcept
Implementation of standard assigning operator.
l_ivector_slice & operator*=(const l_interval &r) noexcept
Implementation of multiplication and allocation operation.
The Multiple-Precision Data Type l_ivector.
Definition l_ivector.hpp:55
l_ivector() noexcept
Constructor of class l_ivector.
Definition l_ivector.inl:31
l_ivector & operator=(const l_ivector &rv) noexcept
Implementation of standard assigning operator.
The Multiple-Precision Data Type l_rvector_slice.
The Multiple-Precision Data Type l_rvector.
Definition l_rvector.hpp:54
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition cdot.cpp:29
l_ivector _l_ivector(const l_interval &r) noexcept
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
cimatrix & operator*=(cimatrix &m, const cinterval &c) noexcept
Implementation of multiplication and allocation operation.
civector operator*(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of multiplication operation.
Definition cimatrix.inl:731