Menu

[r168]: / trunk / include / zgbmatrix- / zgbmatrix-complex.hpp  Maximize  Restore  History

Download this file

44 lines (37 with data), 1.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//=============================================================================
/*! zgbmatrix*=comple operator */
inline zgbmatrix& zgbmatrix::operator*=(const comple& d)
{CPPL_VERBOSE_REPORT;
zscal_((kl+ku+1)*n, d, array, 1);
return *this;
}
//=============================================================================
/*! zgbmatrix/=comple operator */
inline zgbmatrix& zgbmatrix::operator/=(const comple& d)
{CPPL_VERBOSE_REPORT;
zscal_((kl+ku+1)*n, 1./d, array, 1);
return *this;
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//=============================================================================
/*! zgbmatrix*comple operator */
inline _zgbmatrix operator*(const zgbmatrix& mat, const comple& d)
{CPPL_VERBOSE_REPORT;
zgbmatrix newmat(mat.m, mat.n, mat.kl, mat.ku);
for(long i=0; i<(newmat.kl+newmat.ku+1)*newmat.n; i++){
newmat.array[i] =mat.array[i]*d;
}
return _(newmat);
}
//=============================================================================
/*! zgbmatrix/comple operator */
inline _zgbmatrix operator/(const zgbmatrix& mat, const comple& d)
{CPPL_VERBOSE_REPORT;
zgbmatrix newmat(mat.m, mat.n, mat.kl, mat.ku);
for(long i=0; i<(newmat.kl+newmat.ku+1)*newmat.n; i++){
newmat.array[i] =mat.array[i]/d;
}
return _(newmat);
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.