C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
civecrmat.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: civecrmat.inl,v 1.24 2014/01/30 17:23:44 cxsc Exp $ */
25 
26 // Here are definitions for civector x rmatrix-Functions
27 #ifndef _CXSC_CIVECRMAT_INL_INCLUDED
28 #define _CXSC_CIVECRMAT_INL_INCLUDED
29 
30 namespace cxsc {
31 
32  INLINE civector::civector(const rmatrix &sl)
33 #if(CXSC_INDEX_CHECK)
34 
35 #else
36  noexcept
37 #endif
38  { _vmconstr<civector,rmatrix,cinterval>(*this,sl); }
40 #if(CXSC_INDEX_CHECK)
41 
42 #else
43  noexcept
44 #endif
45  { _vmsconstr<civector,rmatrix_slice,cinterval>(*this,sl); }
46  INLINE civector::civector(const rmatrix_subv &v) noexcept:l(v.lb),u(v.ub),size(v.size)
47  {
48  dat=new cinterval[size];
49  for (int i=0, j=v.start;i<v.size;i++,j+=v.offset)
50  dat[i]=v.dat[j];
51  }
52  INLINE civector _civector(const rmatrix &sl)
53 #if(CXSC_INDEX_CHECK)
54 
55 #else
56  noexcept
57 #endif
58  { return civector(sl); }
59  INLINE civector _civector(const rmatrix_slice &sl)
60 #if(CXSC_INDEX_CHECK)
61 
62 #else
63  noexcept
64 #endif
65  { return civector(sl); }
66 
67  INLINE civector &civector::operator =(const rmatrix_subv &mv) noexcept { return _vmvassign<civector,rmatrix_subv,cinterval>(*this,mv); }
68  INLINE civector_slice &civector_slice::operator =(const rmatrix_subv &mv) noexcept { return _vsvassign(*this,rvector(mv)); }
70 #if(CXSC_INDEX_CHECK)
71 
72 #else
73  noexcept
74 #endif
75  { return _vmassign<civector,rmatrix,cinterval>(*this,m); }
77 #if(CXSC_INDEX_CHECK)
78 
79 #else
80  noexcept
81 #endif
82  { return _vmassign<civector,rmatrix,cinterval>(*this,rmatrix(m)); }
84 #if(CXSC_INDEX_CHECK)
85 
86 #else
87  noexcept
88 #endif
89  { return _vsvassign(*this,rvector(m)); }
91 #if(CXSC_INDEX_CHECK)
92 
93 #else
94  noexcept
95 #endif
96  { return _vsvassign(*this,civector(rmatrix(m))); }
97 
98  INLINE civector operator *(const rmatrix &m,const civector &v)
99 #if(CXSC_INDEX_CHECK)
100 
101 #else
102  noexcept
103 #endif
104  { return _mvcimult<rmatrix,civector,civector>(m,v); }
105  INLINE civector operator *(const rmatrix_slice &ms,const civector &v)
106 #if(CXSC_INDEX_CHECK)
107 
108 #else
109  noexcept
110 #endif
111  { return _msvcimult<rmatrix_slice,civector,civector>(ms,v); }
112  INLINE civector operator *(const civector &v,const rmatrix &m)
113 #if(CXSC_INDEX_CHECK)
114 
115 #else
116  noexcept
117 #endif
118  { return _vmcimult<civector,rmatrix,civector>(v,m); }
119  INLINE civector operator *(const civector &v,const rmatrix_slice &ms)
120 #if(CXSC_INDEX_CHECK)
121 
122 #else
123  noexcept
124 #endif
125  { return _vmscimult<civector,rmatrix_slice,civector>(v,ms); }
126  INLINE civector &operator *=(civector &v,const rmatrix &m)
127 #if(CXSC_INDEX_CHECK)
128 
129 #else
130  noexcept
131 #endif
132  { return _vmcimultassign<civector,rmatrix,cinterval>(v,m); }
133  INLINE civector &operator *=(civector &v,const rmatrix_slice &ms)
134 #if(CXSC_INDEX_CHECK)
135 
136 #else
137  noexcept
138 #endif
139  { return _vmscimultassign<civector,rmatrix_slice,cinterval>(v,ms); }
140 
141  INLINE civector operator *(const civector_slice &v,const rmatrix &m)
142 #if(CXSC_INDEX_CHECK)
143 
144 #else
145  noexcept
146 #endif
147  { return _vmcimult<civector,rmatrix,civector>(civector(v),m); }
149 #if(CXSC_INDEX_CHECK)
150 
151 #else
152  noexcept
153 #endif
154  { return _vsmcimultassign<civector_slice,rmatrix,cinterval>(*this,m); }
155 
156 } // namespace cxsc
157 
158 #endif
159 
cxsc::civector_slice
The Data Type civector_slice.
Definition: civector.hpp:1015
cxsc::civector::operator=
civector & operator=(const civector &rv) noexcept
Implementation of standard assigning operator.
Definition: civector.inl:339
cxsc::operator*=
cimatrix & operator*=(cimatrix &m, const cinterval &c) noexcept
Implementation of multiplication and allocation operation.
Definition: cimatrix.inl:1605
cxsc::civector::civector
civector() noexcept
Constructor of class civector.
Definition: civector.inl:31
cxsc::rmatrix
The Data Type rmatrix.
Definition: rmatrix.hpp:471
cxsc::rvector
The Data Type rvector.
Definition: rvector.hpp:58
cxsc::operator*
civector operator*(const cimatrix_subv &rv, const cinterval &s) noexcept
Implementation of multiplication operation.
Definition: cimatrix.inl:731
cxsc::civector_slice::operator=
civector_slice & operator=(const scivector_slice &sl)
Implementation of standard assigning operator.
Definition: scivector.hpp:4688
cxsc::rmatrix_subv
The Data Type rmatrix_subv.
Definition: rmatrix.hpp:54
cxsc::civector_slice::operator*=
civector_slice & operator*=(const cinterval &r) noexcept
Implementation of multiplication and allocation operation.
Definition: civector.inl:720
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::cinterval
The Scalar Type cinterval.
Definition: cinterval.hpp:55
cxsc::civector
The Data Type civector.
Definition: civector.hpp:57