[mareframe] Annotation of /trunk/gadget/popratio.cc
Annotation of /trunk/gadget/popratio.cc
Parent Directory
| Revision Log
Revision 1 -
(view)
(download)
1 : |
agomez |
1 |
#include "popratio.h" |
2 : |
|
|
|
3 : |
|
|
PopRatio& PopRatio::operator = (const PopRatio& a) {
|
4 : |
|
|
if (a.N == NULL) {
|
5 : |
|
|
N = NULL;
|
6 : |
|
|
R = 0.0;
|
7 : |
|
|
|
8 : |
|
|
} else {
|
9 : |
|
|
if (N == NULL)
|
10 : |
|
|
N = a.N;
|
11 : |
|
|
else
|
12 : |
|
|
*N = *(a.N);
|
13 : |
|
|
|
14 : |
|
|
R = a.R;
|
15 : |
|
|
}
|
16 : |
|
|
return *this;
|
17 : |
|
|
}
|
18 : |
|
|
|
19 : |
|
|
PopRatio& PopRatio::operator += (const PopRatio& a) {
|
20 : |
|
|
*N += *(a.N);
|
21 : |
|
|
R = 0.0;
|
22 : |
|
|
return *this;
|
23 : |
|
|
}
|
|