lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master f5ad6f7 6/6: Expunge disused class SurrChgRat


From: Greg Chicares
Subject: [lmi-commits] [lmi] master f5ad6f7 6/6: Expunge disused class SurrChgRates
Date: Tue, 30 Oct 2018 18:21:43 -0400 (EDT)

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

    Expunge disused class SurrChgRates
---
 Makefile.am       |  2 --
 basic_values.hpp  |  2 --
 basicvalues.cpp   |  2 --
 ihs_acctval.cpp   |  1 -
 ihs_basicval.cpp  |  5 ---
 objects.make      |  1 -
 surrchg_rates.cpp | 44 -------------------------
 surrchg_rates.hpp | 98 -------------------------------------------------------
 8 files changed, 155 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index ed5abc5..6f6a7ee 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -362,7 +362,6 @@ liblmi_common_sources = \
     round_glibc.cpp \
     sigfpe.cpp \
     single_cell_document.cpp \
-    surrchg_rates.cpp \
     system_command.cpp \
     timer.cpp \
     tn_range_types.cpp \
@@ -1328,7 +1327,6 @@ noinst_HEADERS = \
     stratified_charges.hpp \
     stratified_charges.xpp \
     stream_cast.hpp \
-    surrchg_rates.hpp \
     system_command.hpp \
     test_tools.hpp \
     text_doc.hpp \
diff --git a/basic_values.hpp b/basic_values.hpp
index e5443b9..3f10017 100644
--- a/basic_values.hpp
+++ b/basic_values.hpp
@@ -56,7 +56,6 @@ class Irc7702;
 class Irc7702A;
 class Loads;
 class MortalityRates;
-class SurrChgRates;
 class death_benefits;
 class modal_outlay;
 class premium_tax;
@@ -120,7 +119,6 @@ class LMI_SO BasicValues
     std::shared_ptr<stratified_charges> StratifiedCharges_;
     std::shared_ptr<MortalityRates>     MortalityRates_;
     std::shared_ptr<InterestRates>      InterestRates_;
-    std::shared_ptr<SurrChgRates>       SurrChgRates_;
     std::shared_ptr<death_benefits>     DeathBfts_;
     std::shared_ptr<modal_outlay>       Outlay_;
     std::shared_ptr<premium_tax>        PremiumTax_;
diff --git a/basicvalues.cpp b/basicvalues.cpp
index 5373b05..c664609 100644
--- a/basicvalues.cpp
+++ b/basicvalues.cpp
@@ -34,7 +34,6 @@
 #include "mortality_rates.hpp"
 #include "outlay.hpp"
 #include "premium_tax.hpp"
-#include "surrchg_rates.hpp"
 
 #include <algorithm>                    // max()
 #include <cmath>                        // pow()
@@ -117,7 +116,6 @@ void BasicValues::Init()
     // Multilife contracts will need a vector of mortality-rate objects.
     MortalityRates_.reset(new MortalityRates (*this));
     InterestRates_ .reset(new InterestRates  (*this));
-    SurrChgRates_  .reset(new SurrChgRates   (*Database_));
     DeathBfts_     .reset(new death_benefits (GetLength(), yare_input_));
     Outlay_        .reset(new modal_outlay   (yare_input_));
     PremiumTax_    .reset(new premium_tax    (PremiumTaxState_, *Database_));
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 0b016ab..efa321f 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -45,7 +45,6 @@
 #include "premium_tax.hpp"
 #include "ssize_lmi.hpp"
 #include "stratified_algorithms.hpp"
-#include "surrchg_rates.hpp"
 
 #include <algorithm>
 #include <cmath>
diff --git a/ihs_basicval.cpp b/ihs_basicval.cpp
index ccf8684..8c217c3 100644
--- a/ihs_basicval.cpp
+++ b/ihs_basicval.cpp
@@ -50,7 +50,6 @@
 #include "product_data.hpp"
 #include "rounding_rules.hpp"
 #include "stratified_charges.hpp"
-#include "surrchg_rates.hpp"
 #include "value_cast.hpp"
 
 #include <algorithm>
@@ -218,8 +217,6 @@ void BasicValues::Init()
     // Interest rates require tiered data and 7702 spread.
     MortalityRates_.reset(new MortalityRates (*this));
     InterestRates_ .reset(new InterestRates  (*this));
-    // Surrender-charge rates will eventually require mortality rates.
-    SurrChgRates_  .reset(new SurrChgRates   (*Database_));
     DeathBfts_     .reset(new death_benefits (GetLength(), yare_input_));
     // Outlay requires only input; it might someday use interest rates.
     Outlay_        .reset(new modal_outlay   (yare_input_));
@@ -310,8 +307,6 @@ void BasicValues::GPTServerInit()
     // Requires database.
     MortalityRates_.reset(new MortalityRates (*this)); // Used by certain 
target-premium calculations.
 //  InterestRates_ .reset(new InterestRates  (*this));
-    // Will require mortality rates eventually.
-//  SurrChgRates_  .reset(new SurrChgRates   (Database_));
 //  DeathBfts_     .reset(new death_benefits (GetLength(), yare_input_));
     // Outlay requires only input; it might someday use interest rates.
 //  Outlay_        .reset(new modal_outlay   (yare_input_));
diff --git a/objects.make b/objects.make
index 5e8080c..73d3990 100644
--- a/objects.make
+++ b/objects.make
@@ -245,7 +245,6 @@ common_common_objects := \
   round_glibc.o \
   sigfpe.o \
   single_cell_document.o \
-  surrchg_rates.o \
   system_command.o \
   timer.o \
   tn_range_types.o \
diff --git a/surrchg_rates.cpp b/surrchg_rates.cpp
deleted file mode 100644
index 7b3cabb..0000000
--- a/surrchg_rates.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// Life insurance illustrations: surrender charge rates.
-//
-// Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 
2014, 2015, 2016, 2017, 2018 Gregory W. Chicares.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2 as
-// published by the Free Software Foundation.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-//
-// http://savannah.nongnu.org/projects/lmi
-// email: <address@hidden>
-// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
-
-#include "pchfile.hpp"
-
-#include "surrchg_rates.hpp"
-
-#include "database.hpp"
-#include "dbnames.hpp"
-
-//============================================================================
-SurrChgRates::SurrChgRates(product_database const& database)
-{
-    Initialize(database);
-}
-
-//============================================================================
-void SurrChgRates::Initialize(product_database const& database)
-{
-    database.Query(RatePerDollarOfPremium_     , DB_SurrChgPremMult    );
-    database.Query(RatePerDollarOfAcctval_     , DB_SurrChgAcctValMult );
-    database.Query(RatePerDollarOfSpecamt_     , DB_SurrChgSpecAmtMult );
-    database.Query(AcctvalRateDurationalFactor_, DB_SurrChgAcctValSlope);
-    database.Query(SpecamtRateDurationalFactor_, DB_SurrChgSpecAmtSlope);
-}
-
diff --git a/surrchg_rates.hpp b/surrchg_rates.hpp
deleted file mode 100644
index 4e2a39f..0000000
--- a/surrchg_rates.hpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// Life insurance illustrations: surrender charge rates.
-//
-// Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 
2014, 2015, 2016, 2017, 2018 Gregory W. Chicares.
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License version 2 as
-// published by the Free Software Foundation.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-//
-// http://savannah.nongnu.org/projects/lmi
-// email: <address@hidden>
-// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
-
-#ifndef surrchg_rates_hpp
-#define surrchg_rates_hpp
-
-#include "config.hpp"
-
-#include <vector>
-
-class product_database;
-
-class SurrChgRates
-{
-  public:
-    SurrChgRates(product_database const&);
-
-    std::vector<double> const& RatePerDollarOfPremium() const;
-    std::vector<double> const& RatePerDollarOfAcctval() const;
-    std::vector<double> const& RatePerDollarOfSpecamt() const;
-    std::vector<double> const& AcctvalRateDurationalFactor() const;
-    std::vector<double> const& SpecamtRateDurationalFactor() const;
-
-    // Ultimately, we'll want to handle tabular surrender charges too.
-
-  private:
-    SurrChgRates();
-
-    // Ultimately, we'll want a pointer to a mortality-rate object
-    // too, that we can do SNFL calculations.
-    void Initialize(product_database const&);
-
-    std::vector<double> RatePerDollarOfPremium_;
-    std::vector<double> RatePerDollarOfAcctval_;
-    std::vector<double> RatePerDollarOfSpecamt_;
-
-    // These member supports surrender-charge structures that are an
-    // attained-age multiple of acctval or specamt times a factor that
-    // depends on duration only, e.g.
-    //   specamt(t) * rate(x+t) * factor[t]
-    // For instance, if the initial surrender charge grades off by ten
-    // percent of its original amount each year, use 1.0, 0.9,...0.0 .
-    // It is contemplated that these factors be accessed by duration
-    // since the addition of each surrender charge layer.
-    std::vector<double> AcctvalRateDurationalFactor_;
-    std::vector<double> SpecamtRateDurationalFactor_;
-};
-
-inline std::vector<double> const&
-SurrChgRates::RatePerDollarOfPremium() const
-{
-    return RatePerDollarOfPremium_;
-}
-
-inline std::vector<double> const&
-SurrChgRates::RatePerDollarOfAcctval() const
-{
-    return RatePerDollarOfAcctval_;
-}
-
-inline std::vector<double> const&
-SurrChgRates::RatePerDollarOfSpecamt() const
-{
-    return RatePerDollarOfSpecamt_;
-}
-
-inline std::vector<double> const&
-SurrChgRates::AcctvalRateDurationalFactor() const
-{
-    return AcctvalRateDurationalFactor_;
-}
-
-inline std::vector<double> const&
-SurrChgRates::SpecamtRateDurationalFactor() const
-{
-    return SpecamtRateDurationalFactor_;
-}
-
-#endif // surrchg_rates_hpp
-



reply via email to

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