00001 //============================================================================= 00002 //! Component Class for Complex Double-precision Sparse Matrix Classes 00003 class zcomponent 00004 { 00005 public: 00006 /////////////////////////////////////////////// 00007 /////////////////// objects /////////////////// 00008 /////////////////////////////////////////////// 00009 uint32_t i; //!< i index of the component 00010 uint32_t j; //!< j index of the component 00011 comple v; //!< value of the component 00012 00013 /////////////////////////////////////////////// 00014 ///////////////// constructors //////////////// 00015 /////////////////////////////////////////////// 00016 inline zcomponent(){ ; } 00017 inline zcomponent(const uint32_t& _i, const uint32_t& _j, const comple& _v) :i(_i), j(_j), v(_v){ ; } 00018 00019 /////////////////////////////////////////////// 00020 ////////////////// functions ////////////////// 00021 /////////////////////////////////////////////// 00022 inline friend std::ostream& operator<<(std::ostream&, const zcomponent&); 00023 }; 00024 00025 /////////////////////////////////////////////////////////////////////////////// 00026 /////////////////////////////////////////////////////////////////////////////// 00027 /////////////////////////////////////////////////////////////////////////////// 00028 00029 //============================================================================= 00030 inline std::ostream& operator<<(std::ostream& s, const zcomponent& c) 00031 {VERBOSE_REPORT; 00032 s << "(" << c.i << ", " << c.j << ", " << c.v << ")" << std::flush; 00033 return s; 00034 } 00035 00036 /////////////////////////////////////////////////////////////////////////////// 00037 /////////////////////////////////////////////////////////////////////////////// 00038 /////////////////////////////////////////////////////////////////////////////// 00039 00040 //============================================================================= 00041 /*! lessthan function for i of zcomponent */ 00042 inline bool ilt(const zcomponent& a, const zcomponent& b) 00043 {VERBOSE_REPORT; 00044 return a.i < b.i; 00045 } 00046 00047 //============================================================================= 00048 /*! lessthan function for j of zcomponent */ 00049 inline bool jlt(const zcomponent& a, const zcomponent& b) 00050 {VERBOSE_REPORT; 00051 return a.j < b.j; 00052 }