CPPLapack
 All Classes Files Functions Variables Friends Pages
zcomponent.hpp
Go to the documentation of this file.
1 //=============================================================================
2 //! Component Class for Complex Double-precision Sparse Matrix Classes
3 class zcomponent
4 {
5 public:
6  ///////////////////////////////////////////////
7  /////////////////// objects ///////////////////
8  ///////////////////////////////////////////////
9  CPPL_INT i; //!< i index of the component
10  CPPL_INT j; //!< j index of the component
11  comple v; //!< value of the component
12 
13  ///////////////////////////////////////////////
14  ///////////////// constructors ////////////////
15  ///////////////////////////////////////////////
16  inline zcomponent(){ ; }
17  inline zcomponent(const CPPL_INT& _i, const CPPL_INT& _j, const comple& _v) :i(_i), j(_j), v(_v){ ; }
18 
19  ///////////////////////////////////////////////
20  ////////////////// functions //////////////////
21  ///////////////////////////////////////////////
22  inline friend std::ostream& operator<<(std::ostream&, const zcomponent&);
23 };
24 
25 ///////////////////////////////////////////////////////////////////////////////
26 ///////////////////////////////////////////////////////////////////////////////
27 ///////////////////////////////////////////////////////////////////////////////
28 
29 //=============================================================================
30 inline std::ostream& operator<<(std::ostream& s, const zcomponent& c)
31 {CPPL_VERBOSE_REPORT;
32  s << "(" << c.i << ", " << c.j << ", " << c.v << ")" << std::flush;
33  return s;
34 }
35 
36 ///////////////////////////////////////////////////////////////////////////////
37 ///////////////////////////////////////////////////////////////////////////////
38 ///////////////////////////////////////////////////////////////////////////////
39 
40 //=============================================================================
41 /*! lessthan function for i of zcomponent */
42 inline bool ilt(const zcomponent& a, const zcomponent& b)
43 {CPPL_VERBOSE_REPORT;
44  return a.i < b.i;
45 }
46 
47 //=============================================================================
48 /*! lessthan function for j of zcomponent */
49 inline bool jlt(const zcomponent& a, const zcomponent& b)
50 {CPPL_VERBOSE_REPORT;
51  return a.j < b.j;
52 }
comple v
value of the component
Definition: zcomponent.hpp:11
std::ostream & operator<<(std::ostream &s, const zcomponent &c)
Definition: zcomponent.hpp:30
Component Class for Complex Double-precision Sparse Matrix Classes.
Definition: zcomponent.hpp:3
CPPL_INT j
j index of the component
Definition: zcomponent.hpp:10
bool ilt(const zcomponent &a, const zcomponent &b)
Definition: zcomponent.hpp:42
CPPL_INT i
i index of the component
Definition: zcomponent.hpp:9
zcomponent(const CPPL_INT &_i, const CPPL_INT &_j, const comple &_v)
Definition: zcomponent.hpp:17
bool jlt(const zcomponent &a, const zcomponent &b)
Definition: zcomponent.hpp:49
friend std::ostream & operator<<(std::ostream &, const zcomponent &)
Definition: zcomponent.hpp:30