CPPLapack
 All Classes Files Functions Variables Friends
dcomponent.hpp
Go to the documentation of this file.
00001 //=============================================================================
00002 //! Component Class for Real Double-precision Sparse Matrix Classes
00003 class dcomponent
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   double v; //!< value of the component
00012   
00013   ///////////////////////////////////////////////
00014   ///////////////// constructors ////////////////
00015   ///////////////////////////////////////////////
00016   inline dcomponent(){ ; }
00017   inline dcomponent(const uint32_t& _i, const uint32_t& _j, const double& _v) :i(_i), j(_j), v(_v){ ; }
00018   
00019   ///////////////////////////////////////////////
00020   ////////////////// functions //////////////////
00021   ///////////////////////////////////////////////
00022   inline friend std::ostream& operator<<(std::ostream&, const dcomponent&);
00023   inline static bool ilt(const dcomponent&, const dcomponent&);
00024   inline static bool jlt(const dcomponent&, const dcomponent&);
00025 };
00026 
00027 ///////////////////////////////////////////////////////////////////////////////
00028 ///////////////////////////////////////////////////////////////////////////////
00029 ///////////////////////////////////////////////////////////////////////////////
00030 
00031 //=============================================================================
00032 inline std::ostream& operator<<(std::ostream& s, const dcomponent& c)
00033 {VERBOSE_REPORT;
00034   s << "(" << c.i << ", " << c.j << ",  " << c.v << ")" << std::flush;
00035   return s;
00036 }
00037 
00038 //=============================================================================
00039 /*! lessthan function for i of dcomponent */
00040 inline bool dcomponent::ilt(const dcomponent& a, const dcomponent& b)
00041 {VERBOSE_REPORT;
00042   return a.i < b.i;
00043 }
00044 
00045 //=============================================================================
00046 /*! lessthan function for j of dcomponent */
00047 inline bool dcomponent::jlt(const dcomponent& a, const dcomponent& b)
00048 {VERBOSE_REPORT;
00049   return a.j < b.j;
00050 }
 All Classes Files Functions Variables Friends