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 
35 #else
36  noexcept
37 #endif
38  { _vmconstr<ivector,rmatrix,interval>(*this,sl); }
39  INLINE ivector::ivector(const rmatrix_slice &sl)
40 #if(CXSC_INDEX_CHECK)
41 
42 #else
43  noexcept
44 #endif
45  { _vmsconstr<ivector,rmatrix_slice,interval>(*this,sl); }
46  INLINE ivector::ivector(const rmatrix_subv &v) noexcept: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 
60 #else
61  noexcept
62 #endif
63  { return ivector(sl); }
69  INLINE ivector _ivector(const rmatrix_slice &sl)
70 #if(CXSC_INDEX_CHECK)
71 
72 #else
73  noexcept
74 #endif
75  { return ivector(sl); }
76 
77 
78  INLINE void SetInf(ivector &iv,const rmatrix_subv &rv)
79 #if(CXSC_INDEX_CHECK)
80 
81 #else
82  noexcept
83 #endif
84  { _vmvsetinf(iv,rv); }
85  INLINE void SetSup(ivector &iv,const rmatrix_subv &rv)
86 #if(CXSC_INDEX_CHECK)
87 
88 #else
89  noexcept
90 #endif
91  { _vmvsetsup(iv,rv); }
92  INLINE void SetInf(ivector_slice &iv,const rmatrix_subv &rv)
93 #if(CXSC_INDEX_CHECK)
94 
95 #else
96  noexcept
97 #endif
98  { _vsvsetinf(iv,rvector(rv)); }
99  INLINE void SetSup(ivector_slice &iv,const rmatrix_subv &rv)
100 #if(CXSC_INDEX_CHECK)
101 
102 #else
103  noexcept
104 #endif
105  { _vsvsetsup(iv,rvector(rv)); }
106 
107  INLINE void UncheckedSetInf(ivector &iv,const rmatrix_subv &rv)
108 #if(CXSC_INDEX_CHECK)
109 
110 #else
111  noexcept
112 #endif
113  { _vmvusetinf(iv,rv); }
114  INLINE void UncheckedSetSup(ivector &iv,const rmatrix_subv &rv)
115 #if(CXSC_INDEX_CHECK)
116 
117 #else
118  noexcept
119 #endif
120  { _vmvusetsup(iv,rv); }
121  INLINE void UncheckedSetInf(ivector_slice &iv,const rmatrix_subv &rv)
122 #if(CXSC_INDEX_CHECK)
123 
124 #else
125  noexcept
126 #endif
127  { _vsvusetinf(iv,rvector(rv)); }
128  INLINE void UncheckedSetSup(ivector_slice &iv,const rmatrix_subv &rv)
129 #if(CXSC_INDEX_CHECK)
130 
131 #else
132  noexcept
133 #endif
134  { _vsvusetsup(iv,rvector(rv)); }
135 
136  INLINE ivector &ivector::operator =(const rmatrix_subv &mv) noexcept { return _vmvassign<ivector,rmatrix_subv,interval>(*this,mv); }
137  INLINE ivector_slice &ivector_slice::operator =(const rmatrix_subv &mv) noexcept { return _vsvassign(*this,rvector(mv)); }
139 #if(CXSC_INDEX_CHECK)
140 
141 #else
142  noexcept
143 #endif
144  { return _vmassign<ivector,rmatrix,interval>(*this,m); }
146 #if(CXSC_INDEX_CHECK)
147 
148 #else
149  noexcept
150 #endif
151  { return _vmassign<ivector,rmatrix,interval>(*this,rmatrix(m)); }
153 #if(CXSC_INDEX_CHECK)
154 
155 #else
156  noexcept
157 #endif
158  { return _vsvassign(*this,rvector(m)); }
160 #if(CXSC_INDEX_CHECK)
161 
162 #else
163  noexcept
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 
170 #else
171  noexcept
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 
177 #else
178  noexcept
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 
184 #else
185  noexcept
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 
191 #else
192  noexcept
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 
198 #else
199  noexcept
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 
205 #else
206  noexcept
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 
213 #else
214  noexcept
215 #endif
216  { return _vmimult<ivector,rmatrix,ivector>(ivector(v),m); }
218 #if(CXSC_INDEX_CHECK)
219 
220 #else
221  noexcept
222 #endif
223  { return _vsmimultassign<ivector_slice,rmatrix,interval>(*this,m); }
224 
225 } // namespace cxsc
226 
227 #endif
228 
cxsc::interval
The Scalar Type interval.
Definition: interval.hpp:55
cxsc::operator*=
cimatrix & operator*=(cimatrix &m, const cinterval &c) noexcept
Implementation of multiplication and allocation operation.
Definition: cimatrix.inl:1605
cxsc::ivector::operator=
ivector & operator=(const ivector &rv) noexcept
Implementation of standard assigning operator.
Definition: ivector.inl:263
cxsc::rmatrix
The Data Type rmatrix.
Definition: rmatrix.hpp:471
cxsc::ivector_slice::operator=
ivector_slice & operator=(const sivector &sl)
Implementation of standard assigning operator.
Definition: sivector.hpp:2194
cxsc::rvector
The Data Type rvector.
Definition: rvector.hpp:58
cxsc::ivector_slice
The Data Type ivector_slice.
Definition: ivector.hpp:963
cxsc::operator*
civector operator*(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of multiplication operation.
Definition: cimatrix.inl:731
cxsc::ivector
The Data Type ivector.
Definition: ivector.hpp:55
cxsc::rmatrix_subv
The Data Type rmatrix_subv.
Definition: rmatrix.hpp:54
cxsc
The namespace cxsc, providing all functionality of the class library C-XSC.
Definition: cdot.cpp:29
cxsc::rmatrix_slice
The Data Type rmatrix_slice.
Definition: rmatrix.hpp:1443
cxsc::ivector::ivector
ivector() noexcept
Constructor of class ivector.
Definition: ivector.inl:31
cxsc::ivector_slice::operator*=
ivector_slice & operator*=(const interval &r) noexcept
Implementation of multiplication and allocation operation.
Definition: ivector.inl:496
cxsc::_ivector
INLINE ivector _ivector(const rmatrix &sl) noexcept
Deprecated typecast, which only exist for the reason of compatibility with older versions of C-XSC.
Definition: ivecrmat.inl:57