Project
People
Skill
Log In
|
Get Help
Home
My Page
Projects
Code Snippets
Project Openings
Mareframe
Summary
Activity
Forums
Tracker
Lists
Tasks
Docs
Surveys
News
SCM
Files
[mareframe] Diff of /trunk/gadget/popinfo.cc
[mareframe]
/
trunk
/
gadget
/
popinfo.cc
Repository:
Repository Listing
mareframe
Diff of /trunk/gadget/popinfo.cc
Parent Directory
|
Revision Log
|
Patch
revision 1, Mon Feb 10 17:09:07 2014 UTC
revision 2, Wed Apr 29 12:55:30 2015 UTC
#
Line 7
Line 7
7
return *this;
return *this;
8
}
}
9
PopInfo& PopInfo::operator += (const PopInfo& a) {
if (isZero(N + a.N)) {
W = 0.0;
N = 0.0;
} else if (isZero(a.N)) {
//adding a zero popinfo, so don't do anything
} else if (isZero(N)) {
W = a.W;
N = a.N;
} else {
W = (N * W + a.N * a.W) / (N + a.N);
N = N + a.N;
}
return *this;
}
10
PopInfo PopInfo::operator * (double a) {
PopInfo PopInfo::operator * (double a) {
11
PopInfo c;
PopInfo c;
12
c.N = N * a;
c.N = N * a;
Colored Diff
Long Colored Diff
Unidiff
Context Diff
Side by Side
Legend:
Removed from v.1
changed lines
Added in v.2
root@forge.cesga.es
ViewVC Help
Powered by
ViewVC 1.0.0