[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master df9c566 07/16: Sort nonscalable scalar member
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master df9c566 07/16: Sort nonscalable scalar members together in declaration order |
Date: |
Sat, 11 Apr 2020 20:36:03 -0400 (EDT) |
branch: master
commit df9c5664d5665ebffc493ef9de45bb7a1cc75bc3
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Sort nonscalable scalar members together in declaration order
---
ledger_invariant.cpp | 104 +++++++++++++++++++++++++++------------------------
1 file changed, 55 insertions(+), 49 deletions(-)
diff --git a/ledger_invariant.cpp b/ledger_invariant.cpp
index 0c545cf..1deb8c5 100644
--- a/ledger_invariant.cpp
+++ b/ledger_invariant.cpp
@@ -546,33 +546,26 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
// InforceLives is one longer than the other vectors.
InforceLives [Max] += a_Addend.InforceLives [Max];
- EffDate = a_Addend.EffDate;
- EffDateJdn = a_Addend.EffDateJdn;
- DateOfBirth = a_Addend.DateOfBirth;
- DateOfBirthJdn = a_Addend.DateOfBirthJdn;
- LastCoiReentryDate = a_Addend.LastCoiReentryDate;
- LastCoiReentryDateJdn = a_Addend.LastCoiReentryDateJdn;
- ListBillDate = a_Addend.ListBillDate;
- ListBillDateJdn = a_Addend.ListBillDateJdn;
- InforceAsOfDate = a_Addend.InforceAsOfDate;
- InforceAsOfDateJdn = a_Addend.InforceAsOfDateJdn;
- InitErMode = a_Addend.InitErMode;
- InitDBOpt = a_Addend.InitDBOpt;
+ FundNumbers = a_Addend.FundNumbers;
+ FundNames = a_Addend.FundNames;
+ FundAllocs = a_Addend.FundAllocs;
+ FundAllocations = a_Addend.FundAllocations;
+
+ // Nonscalable scalars.
+
+// MaleProportion
+// NonsmokerProportion
+ GuarMaxMandE = std::max(GuarMaxMandE ,
a_Addend.GuarMaxMandE );
+ InitDacTaxRate = std::max(InitDacTaxRate ,
a_Addend.InitDacTaxRate );
+ InitPremTaxRate = std::max(InitPremTaxRate,
a_Addend.InitPremTaxRate);
+ GenderDistinct = a_Addend.GenderDistinct;
+ GenderBlended = a_Addend.GenderBlended;
+ SmokerDistinct = a_Addend.SmokerDistinct;
+ SmokerBlended = a_Addend.SmokerBlended;
+// SubstdTable
Age = std::min(Age, a_Addend.Age);
RetAge = std::min(RetAge, a_Addend.RetAge); // TODO
?? Does this make sense?
EndtAge = std::max(EndtAge, a_Addend.EndtAge);
-
- // Strings.
- //
- // Override the behavior of LedgerBase::PlusEq() for this handful
- // of strings, which would often or even necessarily vary by life.
- ContractNumber = "";
- Insured1 = "";
- Gender = "";
- Smoker = "";
- UWClass = "";
- SubstandardTable = "";
-
GroupIndivSelection = GroupIndivSelection ||
a_Addend.GroupIndivSelection;
NoLongerIssued = NoLongerIssued ||
a_Addend.NoLongerIssued;
AllowGroupQuote = AllowGroupQuote &&
a_Addend.AllowGroupQuote;
@@ -580,23 +573,8 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
AllowExperienceRating = AllowExperienceRating ||
a_Addend.AllowExperienceRating;
UseExperienceRating = UseExperienceRating ||
a_Addend.UseExperienceRating;
UsePartialMort = a_Addend.UsePartialMort;
-
- GuarMaxMandE = std::max(GuarMaxMandE ,
a_Addend.GuarMaxMandE );
- InitDacTaxRate = std::max(InitDacTaxRate ,
a_Addend.InitDacTaxRate );
- InitPremTaxRate = std::max(InitPremTaxRate,
a_Addend.InitPremTaxRate);
AvgFund = a_Addend.AvgFund;
CustomFund = a_Addend.CustomFund;
- FundNumbers = a_Addend.FundNumbers;
- FundNames = a_Addend.FundNames;
- FundAllocs = a_Addend.FundAllocs;
- FundAllocations = a_Addend.FundAllocations;
- SplitFundAllocation = SplitFundAllocation ||
a_Addend.SplitFundAllocation;
- GenAcctAllocation = a_Addend.GenAcctAllocation;
- GenderDistinct = a_Addend.GenderDistinct;
- GenderBlended = a_Addend.GenderBlended;
- SmokerDistinct = a_Addend.SmokerDistinct;
- SmokerBlended = a_Addend.SmokerBlended;
-
IsMec = a_Addend.IsMec || IsMec;
InforceIsMec = a_Addend.InforceIsMec || InforceIsMec;
@@ -624,26 +602,17 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
HasADD = HasADD || a_Addend.HasADD ;
HasTerm = HasTerm || a_Addend.HasTerm ;
HasSupplSpecAmt = HasSupplSpecAmt || a_Addend.HasSupplSpecAmt;
-
HasChildRider = HasChildRider || a_Addend.HasChildRider ;
HasSpouseRider = HasSpouseRider || a_Addend.HasSpouseRider ;
-
+// SpouseIssueAge
HasHoneymoon = HasHoneymoon || a_Addend.HasHoneymoon ;
PostHoneymoonSpread= a_Addend.PostHoneymoonSpread ;
SplitMinPrem = SplitMinPrem || a_Addend.SplitMinPrem ;
-
ErNotionallyPaysTerm = ErNotionallyPaysTerm ||
a_Addend.ErNotionallyPaysTerm;
-
IsSinglePremium = std::max(a_Addend.IsSinglePremium ,
IsSinglePremium );
-
MaxAnnGuarLoanSpread = std::max(a_Addend.MaxAnnGuarLoanSpread ,
MaxAnnGuarLoanSpread );
MaxAnnCurrLoanDueRate = std::max(a_Addend.MaxAnnCurrLoanDueRate,
MaxAnnCurrLoanDueRate);
- NoLapseMinDur = std::min(a_Addend.NoLapseMinDur, NoLapseMinDur);
- NoLapseMinAge = std::min(a_Addend.NoLapseMinAge, NoLapseMinAge);
- NoLapseAlwaysActive= a_Addend.NoLapseAlwaysActive|| NoLapseAlwaysActive;
- Has1035ExchCharge = a_Addend.Has1035ExchCharge || Has1035ExchCharge;
-
// Logical OR because IsInforce is a taint that prevents us from
// calculating a meaningful IRR. For one thing, we lack payment
// history. For another, even if we had it, payments probably
@@ -651,6 +620,18 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
// routine.
IsInforce = IsInforce || a_Addend.IsInforce ;
+// CurrentCoiMultiplier
+ NoLapseAlwaysActive= a_Addend.NoLapseAlwaysActive|| NoLapseAlwaysActive;
+ NoLapseMinDur = std::min(a_Addend.NoLapseMinDur, NoLapseMinDur);
+ NoLapseMinAge = std::min(a_Addend.NoLapseMinAge, NoLapseMinAge);
+ Has1035ExchCharge = a_Addend.Has1035ExchCharge || Has1035ExchCharge;
+ EffDateJdn = a_Addend.EffDateJdn;
+ DateOfBirthJdn = a_Addend.DateOfBirthJdn;
+ LastCoiReentryDateJdn = a_Addend.LastCoiReentryDateJdn;
+ ListBillDateJdn = a_Addend.ListBillDateJdn;
+ InforceAsOfDateJdn = a_Addend.InforceAsOfDateJdn;
+ SplitFundAllocation = SplitFundAllocation ||
a_Addend.SplitFundAllocation;
+ GenAcctAllocation = a_Addend.GenAcctAllocation;
WriteTsvFile = WriteTsvFile || a_Addend.WriteTsvFile ;
// The composite has a supplemental report iff every cell has one,
@@ -660,6 +641,31 @@ LedgerInvariant& LedgerInvariant::PlusEq(LedgerInvariant
const& a_Addend)
// when its cardinality exceeds the maximum.)
//
SupplementalReport = SupplementalReport && a_Addend.SupplementalReport;
+ // Nonscalable scalars end.
+
+ // Strings.
+ //
+ // Override the behavior of LedgerBase::PlusEq() for this handful
+ // of strings, which would often or even necessarily vary by life.
+ ContractNumber = "";
+ Insured1 = "";
+ Gender = "";
+ Smoker = "";
+ UWClass = "";
+ SubstandardTable = "";
+
+ // Special-case strings.
+
+ EffDate = a_Addend.EffDate;
+ DateOfBirth = a_Addend.DateOfBirth;
+ LastCoiReentryDate = a_Addend.LastCoiReentryDate;
+ ListBillDate = a_Addend.ListBillDate;
+ InforceAsOfDate = a_Addend.InforceAsOfDate;
+
+ // Special-case enumerative data.
+
+ InitErMode = a_Addend.InitErMode;
+ InitDBOpt = a_Addend.InitDBOpt;
return *this;
}
- [lmi-commits] [lmi] master updated (dfb045a -> ed9a11d), Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 5f5f3b5 01/16: Move a large comment block outside a function definition, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master d888936 06/16: Move a comment to a more appropriate place, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master cbc0ec5 03/16: Sort string members together in declaration order, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master f7689a2 08/16: Regularize whitespace, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 95c2f88 02/16: Declutter, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master ce9d6b8 04/16: Change compositing for some string members, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master df9c566 07/16: Sort nonscalable scalar members together in declaration order,
Greg Chicares <=
- [lmi-commits] [lmi] master a7a9404 05/16: Simplify [348], Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 359c74c 09/16: Treat 'InitErMode' the same as any other ledger string, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 255b816 15/16: Mark ledger members dubiously ignored in compositing, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master ed9a11d 16/16: Address ledger members formerly ignored in compositing, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 2e134db 11/16: Add 'InitEeMode' to ledger, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master bb389e4 10/16: Alphabetize members of enumerative type, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 5dfa890 13/16: Reorder and label for greater uniformity, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master db81cdc 12/16: Correct a guaranteed-premium footnote, Greg Chicares, 2020/04/11
- [lmi-commits] [lmi] master 1f6064d 14/16: Fix index-origin errors in port from XSL-FO, Greg Chicares, 2020/04/11