Menu

[r123]: / trunk / include / dcomponent / dcomponent.hpp  Maximize  Restore  History

Download this file

29 lines (24 with data), 894 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//=============================================================================
//! Component Class for Real Double-precision Sparse Matrix Classes */
class dcomponent
{
public:
long i; //!< i index of the component
long j; //!< j index of the component
double v; //!< value of the component
dcomponent(){;}
dcomponent(const long& _i, const long& _j, const double& _v) :i(_i), j(_j), v(_v){ ; }
//bool operator<(const dcomponent& x)const{ return i < x.i; }
};
//=============================================================================
/*! lessthan function for i of dcomponent */
inline bool ilt(const dcomponent& a, const dcomponent& b)
{
return a.i < b.i;
}
//=============================================================================
/*! lessthan function for j of dcomponent */
inline bool jlt(const dcomponent& a, const dcomponent& b)
{
return a.j < b.j;
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.