lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 387eeaa 10/15: Prepare to resolve some marked


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 387eeaa 10/15: Prepare to resolve some marked defects
Date: Sun, 14 Feb 2021 18:24:54 -0500 (EST)

branch: master
commit 387eeaa4cca0a947ebd5c017110eda9684a78acb
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Prepare to resolve some marked defects
    
    Markers attribute discrepancies in the lengths of certain vectors to the
    antediluvian branch, but that branch has long since used the same input
    class as production, so that diagnosis has become incorrect. The vectors
    in question are of unexpected length (zero) only when initialized by the
    BasicValues ctor used by the 7702 server, so the root cause is resolved
    by amending that ctor.
    
    For the moment, it is merely asserted that simplification will work.
    The actual simplification will follow in the next commit.
---
 ihs_basicval.cpp   | 13 +++++++++++++
 interest_rates.cpp |  6 ++++++
 2 files changed, 19 insertions(+)

diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index e883234..e6e73bb 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -160,6 +160,19 @@ BasicValues::BasicValues
     yare_input_.CurrentCoiMultiplier      .assign(db_len, 1.0);
     yare_input_.FlatExtra                 .resize(db_len);
 
+    // Used by class InterestRates:
+    yare_input_.GeneralAccountRateType    = mce_credited_rate;
+    yare_input_.SeparateAccountRateType   = mce_gross_rate;
+    yare_input_.LoanRateType              = mce_fixed_loan_rate;
+    yare_input_.HoneymoonEndorsement      = false;
+    yare_input_.GeneralAccountRate        .assign(db_len, 1.0);
+    yare_input_.SeparateAccountRate       .assign(db_len, 1.0);
+    yare_input_.ExtraCompensationOnAssets .assign(db_len, 1.0);
+    yare_input_.AmortizePremiumLoad       = false;
+    yare_input_.LoanRate                  = 0.0;
+    yare_input_.HoneymoonValueSpread      .assign(db_len, 1.0);
+    yare_input_.PostHoneymoonSpread       = 0.0;
+
     Init();
 }
 
diff --git a/interest_rates.cpp b/interest_rates.cpp
index 7f00555..17a1fd3 100644
--- a/interest_rates.cpp
+++ b/interest_rates.cpp
@@ -323,6 +323,8 @@ void InterestRates::Initialize(BasicValues const& v)
         );
     // TODO ?? At least for the antediluvian branch, the vector in
     // the input class has an inappropriate size.
+    LMI_ASSERT_EQUAL(Length_, lmi::ssize(v.yare_input_.GeneralAccountRate));
+    LMI_ASSERT_EQUAL(Length_, lmi::ssize(GenAcctGrossRate_[mce_gen_curr]));
     GenAcctGrossRate_[mce_gen_curr].resize(Length_);
 
     // General-account interest bonus implemented only as a simple
@@ -358,6 +360,8 @@ void InterestRates::Initialize(BasicValues const& v)
         );
     // TODO ?? At least for the antediluvian branch, the vector in
     // the input class has an inappropriate size.
+    LMI_ASSERT_EQUAL(Length_, lmi::ssize(v.yare_input_.SeparateAccountRate));
+    LMI_ASSERT_EQUAL(Length_, 
lmi::ssize(SepAcctGrossRate_[mce_annual_rate][mce_sep_full]));
     SepAcctGrossRate_[mce_annual_rate][mce_sep_full].resize(Length_);
 
     v.database().query_into(DB_GuarMandE          , MAndERate_[mce_gen_guar]);
@@ -367,6 +371,8 @@ void InterestRates::Initialize(BasicValues const& v)
     // the same way as M&E, iff database entity DB_AssetChargeType has
     // the value 'oe_asset_charge_spread'; otherwise, reflect them
     // elsewhere as an account-value load.
+    LMI_ASSERT_EQUAL(Length_, 
lmi::ssize(v.yare_input_.ExtraCompensationOnAssets));
+    LMI_ASSERT_EQUAL(Length_, lmi::ssize(ExtraSepAcctCharge_));
     if(oe_asset_charge_spread == 
v.database().query<oenum_asset_charge_type>(DB_AssetChargeType))
         {
         // TODO ?? At least for the antediluvian branch, the vector in



reply via email to

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