VERB_code_2.3
dssmatrix-calc.hpp
1 //=============================================================================
3 inline _dssmatrix t(const dssmatrix& mat)
4 {
5 #ifdef CPPL_VERBOSE
6  std::cerr << "# [MARK] t(const dssmatrix&)"
7  << std::endl;
8 #endif//CPPL_VERBOSE
9 
10  dssmatrix newmat(mat.N,mat.M,mat.CAP);
11 
12  for(long c=0; c<mat.VOL; c++){
13  newmat.fput(mat.Jndx[c], mat.Indx[c], mat.Array[c]);
14  }
15 
16  return _(newmat);
17 }
18 
22 
23 //=============================================================================
26 inline void idamax(long& i, long& j, const dssmatrix& mat)
27 {
28 #ifdef CPPL_VERBOSE
29  std::cerr << "# [MARK] idamax(long&, long&, const dssmatrix&)"
30  << std::endl;
31 #endif//CPPL_VERBOSE
32 
33  long index( idamax_(mat.VOL, mat.Array, 1) -1 );
34  i =mat.Indx[index];
35  j =mat.Jndx[index];
36 }
37 
38 //=============================================================================
40 inline double damax(const dssmatrix& mat)
41 {
42 #ifdef CPPL_VERBOSE
43  std::cerr << "# [MARK] damax(const dssmatrix&)"
44  << std::endl;
45 #endif//CPPL_VERBOSE
46 
47  return mat.Array[idamax_(mat.VOL, mat.Array, 1) -1];
48 }
friend double damax(const drovector &)
Definition: drovector-calc.hpp:43
(DO NOT USE) Smart-temporary Real Double-precision Sparse Matrix Class
Definition: _dssmatrix.hpp:3
friend _dcovector t(const drovector &)
Definition: drovector-calc.hpp:3
Real Double-precision Sparse Matrix Class.
Definition: dssmatrix.hpp:3
friend long idamax(const drovector &)
Definition: drovector-calc.hpp:31
void fput(const long &, const long &, const double &)
Definition: dssmatrix-io.hpp:75