[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master dfb045a 8/8: Move a block of code
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master dfb045a 8/8: Move a block of code |
Date: |
Thu, 9 Apr 2020 18:33:05 -0400 (EDT) |
branch: master
commit dfb045a64962fefd0dbc103d0fe63c66861cfebe
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Move a block of code
Moved the block that treats CorridorFactor as a special case to follow
immediately after the call to the base class's PlusEq().
---
ledger_invariant.cpp | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/ledger_invariant.cpp b/ledger_invariant.cpp
index 51f3866..658cd7d 100644
--- a/ledger_invariant.cpp
+++ b/ledger_invariant.cpp
@@ -493,6 +493,17 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
{
LedgerBase::PlusEq(a_Addend, a_Addend.InforceLives);
+ // For 'CorridorFactor', an average weighted by number of lives
+ // would be inaccurate, and indeed any aggregate value could be
+ // surprising because it would not necessarily be monotone (for
+ // two lives with a ten-year age difference, the last ten would
+ // depend on the younger life only, most likely producing a
+ // discontinuity at the older life's maturity age).
+ for(int j = 0; j < a_Addend.Length; ++j)
+ {
+ CorridorFactor [j] = 0.0;
+ }
+
irr_precision_ = a_Addend.irr_precision_;
std::vector<double> const& N = a_Addend.InforceLives;
@@ -766,17 +777,6 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
SmokerDistinct = a_Addend.SmokerDistinct;
SmokerBlended = a_Addend.SmokerBlended;
- // For 'CorridorFactor', an average weighted by number of lives
- // would be inaccurate, and indeed any aggregate value could be
- // surprising because it would not necessarily be monotone (for
- // two lives with a ten-year age difference, the last ten would
- // depend on the younger life only, most likely producing a
- // discontinuity at the older life's maturity age).
- for(int j = 0; j < a_Addend.Length; ++j)
- {
- CorridorFactor [j] = 0.0;
- }
-
IsMec = a_Addend.IsMec || IsMec;
InforceIsMec = a_Addend.InforceIsMec || InforceIsMec;
- [lmi-commits] [lmi] master updated (655648d -> dfb045a), Greg Chicares, 2020/04/09
- [lmi-commits] [lmi] master 859240e 1/8: Remove unneeded assertion and conditional, Greg Chicares, 2020/04/09
- [lmi-commits] [lmi] master 840fd2f 4/8: Treat LedgerInvariant::Salary as forborne, Greg Chicares, 2020/04/09
- [lmi-commits] [lmi] master 07c029f 2/8: Improve documentation, Greg Chicares, 2020/04/09
- [lmi-commits] [lmi] master ce789de 3/8: Treat 'AddonMonthlyFee' as a BOY vector, Greg Chicares, 2020/04/09
- [lmi-commits] [lmi] master 9cd8cf7 7/8: Refactor: composite 'OtherVectors' in LedgerBase::PlusEq(), Greg Chicares, 2020/04/09
- [lmi-commits] [lmi] master ab9d0d1 6/8: Truncate GPT corridor factors at maturity age [349], Greg Chicares, 2020/04/09
- [lmi-commits] [lmi] master 46b9de9 5/8: Regularize compositing of non-additive vectors, Greg Chicares, 2020/04/09
- [lmi-commits] [lmi] master dfb045a 8/8: Move a block of code,
Greg Chicares <=