VERB_code_2.3
_zssmatrix-calc.hpp
1 //=============================================================================
3 inline _zssmatrix t(const _zssmatrix& mat)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] t(const _zssmatrix&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10  long* mat_Indx(mat.Indx);
11  mat.Indx =mat.Jndx;
12  mat.Jndx =mat_Indx;
13 
14  return mat;
15 }
16 
20 
21 //=============================================================================
24 inline void idamax(long& i, long& j, const _zssmatrix& mat)
25 {
26 #ifdef CPPL_VERBOSE
27  std::cerr << "# [MARK] idamax(long&, long&, const _zssmatrix&)"
28  << std::endl;
29 #endif//CPPL_VERBOSE
30 
31  long index( izamax_(mat.VOL, mat.Array, 1) -1 );
32  i =mat.Indx[index];
33  j =mat.Jndx[index];
34 
35  mat.destroy();
36 }
37 
38 //=============================================================================
40 inline std::complex<double> damax(const _zssmatrix& mat)
41 {
42 #ifdef CPPL_VERBOSE
43  std::cerr << "# [MARK] damax(const _zssmatrix&)"
44  << std::endl;
45 #endif//CPPL_VERBOSE
46 
47  std::complex<double> val( mat.Array[izamax_(mat.VOL, mat.Array, 1) -1] );
48  mat.destroy();
49  return val;
50 }
long VOL
the number of non-zero components
Definition: _zssmatrix.hpp:10
(DO NOT USE) Smart-temporary Complex Double-precision Sparse Matrix Class
Definition: _zssmatrix.hpp:3
friend std::complex< double > damax(const zrovector &)
Definition: zrovector-calc.hpp:77
long * Jndx
1D array to store the j-index of non-zero matrix components
Definition: _zssmatrix.hpp:13
std::complex< double > * Array
1D array to store non-zero matrix data
Definition: _zssmatrix.hpp:11
void destroy() const
Definition: _zssmatrix-misc.hpp:3
long * Indx
1D array to store the i-index of non-zero matrix components
Definition: _zssmatrix.hpp:12
friend long idamax(const zrovector &)
Definition: zrovector-calc.hpp:65
friend _zcovector t(const zrovector &)
Definition: zrovector-calc.hpp:3