lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 2f74b41 25/25: Improve encapsulation of 7702


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 2f74b41 25/25: Improve encapsulation of 7702 "spread"
Date: Wed, 24 Feb 2021 19:00:55 -0500 (EST)

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

    Improve encapsulation of 7702 "spread"
    
    This "spread", representing account-value charges that are deducted
    from certain interest rates used for GLP and GSP calculations, is now
    fully encapsulated in class i7702.
    
    * ihs_irc7702.hpp: Removed the "Deduction from interest rate" argument,
      and the member it initialized (whose value was nowhere used).
    * ihs_irc7702.cpp: Likewise.
    * ihs_basicval.cpp: Likewise.
    * gpt_test.cpp: Likewise. Also removed a local variable that merely
      provided a dummy initializer for this argument.
    * irc7702_interest.hpp: Removed spread() accessor.
---
 gpt_test.cpp         | 2 --
 ihs_basicval.cpp     | 1 -
 ihs_irc7702.cpp      | 2 --
 ihs_irc7702.hpp      | 2 --
 irc7702_interest.hpp | 3 ---
 5 files changed, 10 deletions(-)

diff --git a/gpt_test.cpp b/gpt_test.cpp
index 92620c3..7ca60c1 100644
--- a/gpt_test.cpp
+++ b/gpt_test.cpp
@@ -419,7 +419,6 @@ Irc7702& gpt_test::instantiate_old(int issue_age)
     throw "Code that uses this obsolescent class segfaults with como.";
 #else // !defined LMI_COMO_WITH_MINGW
     int const length = lmi::ssize(q_m);
-    std::vector<double> const zero(length, 0.0);
     // The old class recognizes only one QAB: ADB. So that all QABs
     // can be exercised with the new class, use a linear combination
     // of all QAB rates as the ADB rate here. Copying literal values
@@ -447,7 +446,6 @@ Irc7702& gpt_test::instantiate_old(int issue_age)
             ,glp_ic                          // a_GLPic
             ,gsp_ic                          // a_GSPic
             ,glp_ic                          // a_Ig [ignored here, in effect]
-            ,zero                            // a_IntDed
             ,0.0                             // a_PresentBftAmt
             ,0.0                             // a_PresentSpecAmt
             ,0.0                             // a_LeastBftAmtEver
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index 6af8350..e681f3b 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -461,7 +461,6 @@ void BasicValues::Init7702()
         ,i7702_->net_glp()
         ,i7702_->net_gsp()
         ,i7702_->ig()
-        ,i7702_->spread()
         ,yare_input_.SpecifiedAmount[0] + yare_input_.TermRiderAmount
         ,yare_input_.SpecifiedAmount[0] + yare_input_.TermRiderAmount
         ,yare_input_.SpecifiedAmount[0] + yare_input_.TermRiderAmount
diff --git a/ihs_irc7702.cpp b/ihs_irc7702.cpp
index 39e1b0e..2a9c476 100644
--- a/ihs_irc7702.cpp
+++ b/ihs_irc7702.cpp
@@ -114,7 +114,6 @@ Irc7702::Irc7702
     ,std::vector<double> const& a_GLPic
     ,std::vector<double> const& a_GSPic
     ,std::vector<double> const& a_Ig
-    ,std::vector<double> const& a_IntDed
     ,double                     a_PresentBftAmt
     ,double                     a_PresentSpecAmt
     ,double                     a_LeastBftAmtEver
@@ -146,7 +145,6 @@ Irc7702::Irc7702
     ,GLPic              {a_GLPic}
     ,GSPic              {a_GSPic}
     ,Ig                 {a_Ig}
-    ,IntDed             {a_IntDed}
     ,PresentBftAmt      {a_PresentBftAmt}
     ,PriorBftAmt        {a_PresentBftAmt}
     ,PresentSpecAmt     {a_PresentSpecAmt}
diff --git a/ihs_irc7702.hpp b/ihs_irc7702.hpp
index dedc2a1..bf4ee85 100644
--- a/ihs_irc7702.hpp
+++ b/ihs_irc7702.hpp
@@ -63,7 +63,6 @@ class Irc7702 final
         ,std::vector<double> const& a_GLPic
         ,std::vector<double> const& a_GSPic
         ,std::vector<double> const& a_Ig
-        ,std::vector<double> const& a_IntDed
         ,double                     a_PresentBftAmt
         ,double                     a_PresentSpecAmt
         ,double                     a_LeastBftAmtEver
@@ -179,7 +178,6 @@ class Irc7702 final
     std::vector<double> const& GLPic;      // 7702 GLP interest rate
     std::vector<double> const& GSPic;      // 7702 GSP interest rate
     std::vector<double> const& Ig;         // Death benefit discount rate
-    std::vector<double> const& IntDed;     // Deduction from interest rate
 
     double                     PresentBftAmt;
     double                     PriorBftAmt;
diff --git a/irc7702_interest.hpp b/irc7702_interest.hpp
index 3dbe9c0..dea47e1 100644
--- a/irc7702_interest.hpp
+++ b/irc7702_interest.hpp
@@ -47,9 +47,6 @@ class LMI_SO i7702 final
     std::vector<double> const& net_glp() const {return net_glp_;}
     std::vector<double> const& net_gsp() const {return net_gsp_;}
 
-    // 7702 !! ephemeral
-    std::vector<double> const& spread() const {return spread_;}
-
   private:
     product_database   const& database_;
     stratified_charges const& stratified_;



reply via email to

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