lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [5772] Refactor


From: Greg Chicares
Subject: [lmi-commits] [5772] Refactor
Date: Mon, 23 Sep 2013 22:33:40 +0000

Revision: 5772
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5772
Author:   chicares
Date:     2013-09-23 22:33:39 +0000 (Mon, 23 Sep 2013)
Log Message:
-----------
Refactor

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/gpt_commutation_functions.hpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2013-09-23 13:29:22 UTC (rev 5771)
+++ lmi/trunk/ChangeLog 2013-09-23 22:33:39 UTC (rev 5772)
@@ -32569,3 +32569,18 @@
   mec_server.cpp
 Use 7702-specific DBO enumerations as appropriate.
 
+20130918T1459Z <address@hidden> [542]
+
+  expression_template_0_test.cpp
+Enforce a precondition; improve documentation.
+
+20130923T1329Z <address@hidden> [542]
+
+  gpt_commutation_functions.hpp
+Improve documentation.
+
+20130923T2233Z <address@hidden> [542]
+
+  gpt_commutation_functions.hpp
+Refactor.
+

Modified: lmi/trunk/gpt_commutation_functions.hpp
===================================================================
--- lmi/trunk/gpt_commutation_functions.hpp     2013-09-23 13:29:22 UTC (rev 
5771)
+++ lmi/trunk/gpt_commutation_functions.hpp     2013-09-23 22:33:39 UTC (rev 
5772)
@@ -30,6 +30,34 @@
 
 #include <vector>
 
+/// Loads, fees, and monthly QAB rates used in GPT calculations.
+///
+/// It is simpler to pass these data around as one "parameter object"
+/// than as separate parameters.
+///
+/// Copying vectors into this struct doesn't cost much. The cost could
+/// be avoided by making them reference members.
+///
+/// Mortality and interest rates could have been included. However,
+/// unlike other parameters, they may need various adjustments--e.g.,
+/// conversion from annual to monthly, subject to some maximum or
+/// minimum.
+
+struct gpt_charges
+{
+    std::vector<double> prem_load_target     ;
+    std::vector<double> prem_load_excess     ;
+    std::vector<double> policy_fee_monthly   ;
+    std::vector<double> policy_fee_annual    ;
+    std::vector<double> specamt_load_monthly ;
+    std::vector<double> qab_rate_gio         ;
+    std::vector<double> qab_rate_adb         ;
+    std::vector<double> qab_rate_term        ;
+    std::vector<double> qab_rate_spouse      ;
+    std::vector<double> qab_rate_child       ;
+    std::vector<double> qab_rate_waiver      ;
+};
+
 /// Commutation functions specialized for GPT calculations.
 ///
 /// See section 14.3 here:
@@ -68,17 +96,7 @@
         ,std::vector<double> const& ic
         ,std::vector<double> const& ig
         ,mcenum_dbopt_7702   const  dbo
-        ,std::vector<double> const& prem_load_target
-        ,std::vector<double> const& prem_load_excess
-        ,std::vector<double> const& policy_fee_monthly
-        ,std::vector<double> const& policy_fee_annual
-        ,std::vector<double> const& specamt_load_monthly
-        ,std::vector<double> const& qab_rate_gio
-        ,std::vector<double> const& qab_rate_adb
-        ,std::vector<double> const& qab_rate_term
-        ,std::vector<double> const& qab_rate_spouse
-        ,std::vector<double> const& qab_rate_child
-        ,std::vector<double> const& qab_rate_waiver
+        ,gpt_charges         const& charges
         );
     ~GPTCommFns();
 




reply via email to

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