lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 5dfa890 13/16: Reorder and label for greater


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5dfa890 13/16: Reorder and label for greater uniformity
Date: Sat, 11 Apr 2020 20:36:04 -0400 (EDT)

branch: master
commit 5dfa8907ea3efda6ecc0cb265dc3202b5d92f907
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Reorder and label for greater uniformity
---
 ledger_invariant.cpp |  7 ++++++
 ledger_invariant.hpp | 65 ++++++++++++++++++++++++++++++----------------------
 2 files changed, 44 insertions(+), 28 deletions(-)

diff --git a/ledger_invariant.cpp b/ledger_invariant.cpp
index 67f262e..09fadf4 100644
--- a/ledger_invariant.cpp
+++ b/ledger_invariant.cpp
@@ -79,6 +79,7 @@ void LedgerInvariant::Alloc(int len)
 {
     Length  = len;
 
+    // BOY vectors.
     BegYearVectors  ["TgtPrem"               ] = &TgtPrem                ;
     BegYearVectors  ["GrossPmt"              ] = &GrossPmt               ;
     BegYearVectors  ["EeGrossPmt"            ] = &EeGrossPmt             ;
@@ -93,11 +94,14 @@ void LedgerInvariant::Alloc(int len)
     BegYearVectors  ["ErModalMinimumPremium" ] = &ErModalMinimumPremium  ;
     BegYearVectors  ["AddonMonthlyFee"       ] = &AddonMonthlyFee        ;
 
+    // EOY vectors.
     EndYearVectors  ["TermSpecAmt"           ] = &TermSpecAmt            ;
     EndYearVectors  ["SpecAmt"               ] = &SpecAmt                ;
 
+    // Forborne vectors.
     ForborneVectors ["Salary"                ] = &Salary                 ;
 
+    // Nonscalable vectors.
     OtherVectors    ["IndvTaxBracket"        ] = &IndvTaxBracket         ;
     OtherVectors    ["CorpTaxBracket"        ] = &CorpTaxBracket         ;
     OtherVectors    ["AnnualFlatExtra"       ] = &AnnualFlatExtra        ;
@@ -111,6 +115,7 @@ void LedgerInvariant::Alloc(int len)
     OtherVectors    ["TotalIMF"              ] = &TotalIMF               ;
     OtherVectors    ["RefundableSalesLoad"   ] = &RefundableSalesLoad    ;
 
+    // Scalable scalars.
     ScalableScalars ["InitBaseSpecAmt"       ] = &InitBaseSpecAmt        ;
     ScalableScalars ["InitTermSpecAmt"       ] = &InitTermSpecAmt        ;
     ScalableScalars ["ChildRiderAmount"      ] = &ChildRiderAmount       ;
@@ -130,6 +135,7 @@ void LedgerInvariant::Alloc(int len)
     ScalableScalars ["InforceUnloanedAV"     ] = &InforceUnloanedAV      ;
     ScalableScalars ["InforceTaxBasis"       ] = &InforceTaxBasis        ;
 
+    // Nonscalable scalars.
     OtherScalars    ["MaleProportion"        ] = &MaleProportion         ;
     OtherScalars    ["NonsmokerProportion"   ] = &NonsmokerProportion    ;
     OtherScalars    ["GuarMaxMandE"          ] = &GuarMaxMandE           ;
@@ -188,6 +194,7 @@ void LedgerInvariant::Alloc(int len)
     OtherScalars    ["WriteTsvFile"          ] = &WriteTsvFile           ;
     OtherScalars    ["SupplementalReport"    ] = &SupplementalReport     ;
 
+    // Strings.
     Strings["PolicyForm"                    ] = &PolicyForm                    
;
     Strings["PolicyMktgName"                ] = &PolicyMktgName                
;
     Strings["PolicyLegalName"               ] = &PolicyLegalName               
;
diff --git a/ledger_invariant.hpp b/ledger_invariant.hpp
index 7cd6902..2c2218a 100644
--- a/ledger_invariant.hpp
+++ b/ledger_invariant.hpp
@@ -88,7 +88,7 @@ class LMI_SO LedgerInvariant final
     // Forborne vectors.
     std::vector<double> Salary;
 
-    // Other vectors.
+    // Nonscalable vectors.
     std::vector<double> IndvTaxBracket;
     std::vector<double> CorpTaxBracket;
     std::vector<double> AnnualFlatExtra;
@@ -105,33 +105,6 @@ class LMI_SO LedgerInvariant final
     // any tiered component, but in that case it would vary by basis.
     std::vector<double> TotalIMF;
     std::vector<double> RefundableSalesLoad;
-    // These two are used only for a payment-strategy kludge:
-    std::vector<double> EePmt;
-    std::vector<double> ErPmt;
-
-    // Special-case vectors (not <double>, or different length than others).
-    std::vector<mce_dbopt>DBOpt;
-    std::vector<mce_mode> EeMode;
-    std::vector<mce_mode> ErMode;
-
-    std::vector<double>      FundNumbers;
-    std::vector<std::string> FundNames;
-    std::vector<int>         FundAllocs; // Obsolete--spreadsheet only.
-    std::vector<double>      FundAllocations;
-
-    std::vector<double> InforceLives;
-
-    // IRRs that we need to think about some more before deciding
-    // where to put them.
-
-    std::vector<double> IrrCsvGuar0    ;
-    std::vector<double> IrrDbGuar0     ;
-    std::vector<double> IrrCsvCurr0    ;
-    std::vector<double> IrrDbCurr0     ;
-    std::vector<double> IrrCsvGuarInput;
-    std::vector<double> IrrDbGuarInput ;
-    std::vector<double> IrrCsvCurrInput;
-    std::vector<double> IrrDbCurrInput ;
 
     // Scalable scalars.
     double          InitBaseSpecAmt;
@@ -212,6 +185,8 @@ class LMI_SO LedgerInvariant final
     double          WriteTsvFile;
     double          SupplementalReport;
 
+    // Strings.
+
     // Essential strings describing the policy and company.
     std::string     PolicyForm;
     // Ledger needs no member like product_data::PolicyFormAlternative;
@@ -437,6 +412,40 @@ class LMI_SO LedgerInvariant final
     std::string     InitEeMode;
     std::string     InitErMode;
 
+    // Public data members not included in any of the maps that are
+    // handled by the base class are "special".
+
+    // Special-case vectors.
+
+    // Vectors of type other than <double>.
+    std::vector<mce_dbopt>DBOpt;
+    std::vector<mce_mode> EeMode;
+    std::vector<mce_mode> ErMode;
+
+    // Different length than other vectors.
+    std::vector<double> InforceLives;
+
+    std::vector<double>      FundNumbers;
+    std::vector<std::string> FundNames;
+    std::vector<int>         FundAllocs; // Obsolete--spreadsheet only.
+    std::vector<double>      FundAllocations;
+
+    // These two are used only for a payment-strategy kludge:
+    std::vector<double> EePmt;
+    std::vector<double> ErPmt;
+
+    // IRRs that we need to think about some more before deciding
+    // where to put them.
+
+    std::vector<double> IrrCsvGuar0    ;
+    std::vector<double> IrrDbGuar0     ;
+    std::vector<double> IrrCsvCurr0    ;
+    std::vector<double> IrrDbCurr0     ;
+    std::vector<double> IrrCsvGuarInput;
+    std::vector<double> IrrDbGuarInput ;
+    std::vector<double> IrrCsvCurrInput;
+    std::vector<double> IrrDbCurrInput ;
+
     // Special-case strings.
 
     // Calendar dates are special because date formatting might be



reply via email to

[Prev in Thread] Current Thread [Next in Thread]