13 |
/** |
/** |
14 |
* \brief This is the PopInfo constructor |
* \brief This is the PopInfo constructor |
15 |
*/ |
*/ |
16 |
PopInfo() { N = 0.0; W = 0.0; }; |
PopInfo(double Ni = 0.0, double Wi = 0.0) |
17 |
|
: N(Ni), W(Wi) |
18 |
|
{}; |
19 |
/** |
/** |
20 |
* \brief This is the PopInfo destructor |
* \brief This is the PopInfo destructor |
21 |
*/ |
*/ |
46 |
* \brief This operator will set the PopInfo equal to an existing PopInfo |
* \brief This operator will set the PopInfo equal to an existing PopInfo |
47 |
* \param a is the PopInfo to copy |
* \param a is the PopInfo to copy |
48 |
*/ |
*/ |
49 |
PopInfo& operator = (const PopInfo& a); |
PopInfo& operator = (const PopInfo& a) { |
50 |
|
N = a.N; |
51 |
|
W = a.W; |
52 |
|
return *this; |
53 |
|
} |
54 |
|
|
55 |
/** |
/** |
56 |
* \brief This operator will add an existing PopInfo to the current PopInfo |
* \brief This operator will add an existing PopInfo to the current PopInfo |
57 |
* \param a is the PopInfo to add |
* \param a is the PopInfo to add |
78 |
* \brief This operator will multiply the PopInfo by a constant |
* \brief This operator will multiply the PopInfo by a constant |
79 |
* \param a is the constant |
* \param a is the constant |
80 |
*/ |
*/ |
81 |
PopInfo operator * (double a); |
PopInfo operator * (double a) const { |
82 |
|
return PopInfo(N * a, W); |
83 |
|
} |
84 |
}; |
}; |
85 |
|
|
86 |
#endif |
#endif |