[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master c01cedb 4/6: Replace an 'oe' with an 'mc' enu
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master c01cedb 4/6: Replace an 'oe' with an 'mc' enumeration for CSO era |
Date: |
Sun, 11 Aug 2019 10:10:53 -0400 (EDT) |
branch: master
commit c01cedbdcff5747f5f0f58185bebabd3feb8082f
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Replace an 'oe' with an 'mc' enumeration for CSO era
---
actuarial_table_test.cpp | 4 ++--
basic_tables.cpp | 2 +-
commutation_functions_test.cpp | 4 ++--
cso_table.cpp | 34 +++++++++++++++++-----------------
cso_table.hpp | 4 ++--
dbdict.cpp | 4 ++--
gpt_test.cpp | 2 +-
irc7702_tables.cpp | 2 +-
irc7702_tables.hpp | 2 +-
oecumenic_enumerations.hpp | 6 ------
print_matrix_test.cpp | 2 +-
verify_products.cpp | 4 ++--
12 files changed, 32 insertions(+), 38 deletions(-)
diff --git a/actuarial_table_test.cpp b/actuarial_table_test.cpp
index a8b5cfd..2395b6b 100644
--- a/actuarial_table_test.cpp
+++ b/actuarial_table_test.cpp
@@ -67,7 +67,7 @@ std::vector<double> table_750()
std::vector<double> table_42(int age)
{
static std::vector<double> const q = cso_table
- (oe_1980cso
+ (mce_1980cso
,oe_orthodox
,oe_age_nearest_birthday_ties_younger
,mce_male
@@ -212,7 +212,7 @@ void test_80cso_erratum
)
{
std::vector<double> v0 = cso_table
- (oe_1980cso
+ (mce_1980cso
,autopisty
,alb_or_anb
,mce_male
diff --git a/basic_tables.cpp b/basic_tables.cpp
index ae55292..3d0401b 100644
--- a/basic_tables.cpp
+++ b/basic_tables.cpp
@@ -96,7 +96,7 @@ std::vector<double> LMI_SO irc_7702_q_builtin
,int years_to_maturity
)
{
- auto const era = db.query<oenum_cso_era >(DB_CsoEra);
+ auto const era = db.query<mcenum_cso_era >(DB_CsoEra);
auto const a_b = db.query<oenum_alb_or_anb>(DB_AgeLastOrNearest);
auto const axis_g = db.query<bool >(DB_Irc7702QAxisGender);
auto const axis_s = db.query<bool >(DB_Irc7702QAxisSmoking);
diff --git a/commutation_functions_test.cpp b/commutation_functions_test.cpp
index 58e8916..a9064d5 100644
--- a/commutation_functions_test.cpp
+++ b/commutation_functions_test.cpp
@@ -48,7 +48,7 @@ namespace
std::vector<double> const& sample_q()
{
static std::vector<double> const q = cso_table
- (oe_1980cso
+ (mce_1980cso
,oe_orthodox
,oe_age_nearest_birthday_ties_younger
,mce_male
@@ -1139,7 +1139,7 @@ void Test_Corridor_and_7PP()
,i_upper_12_over_12_from_i<double>()(0.04)
);
irc7702_tables z
- (oe_2001cso
+ (mce_2001cso
,oe_orthodox
,oe_age_last_birthday
,mce_unisex
diff --git a/cso_table.cpp b/cso_table.cpp
index 18f795c..268efc3 100644
--- a/cso_table.cpp
+++ b/cso_table.cpp
@@ -918,24 +918,24 @@ static double const
q2017[cso_n_alb_or_anb][cso_n_gender][cso_n_smoking][cso_ome
namespace
{
-int get_sns_age(oenum_cso_era cso_era, mcenum_smoking smoking)
+int get_sns_age(mcenum_cso_era cso_era, mcenum_smoking smoking)
{
return
((mce_unismoke == smoking) ? 0
- :(oe_1980cso == cso_era) ? cso_sns_age_1980
- :(oe_2001cso == cso_era) ? cso_sns_age_2001
- :(oe_2017cso == cso_era) ? cso_sns_age_2017
- : throw "invalid cso sns age"
+ :(mce_1980cso == cso_era) ? cso_sns_age_1980
+ :(mce_2001cso == cso_era) ? cso_sns_age_2001
+ :(mce_2017cso == cso_era) ? cso_sns_age_2017
+ : throw "invalid cso sns age"
);
}
-int get_omega(oenum_cso_era cso_era)
+int get_omega(mcenum_cso_era cso_era)
{
return
- ((oe_1980cso == cso_era) ? cso_omega_1980
- :(oe_2001cso == cso_era) ? cso_omega_2001
- :(oe_2017cso == cso_era) ? cso_omega_2017
- : throw "invalid cso omega"
+ ((mce_1980cso == cso_era) ? cso_omega_1980
+ :(mce_2001cso == cso_era) ? cso_omega_2001
+ :(mce_2017cso == cso_era) ? cso_omega_2017
+ : throw "invalid cso omega"
);
}
} // Unnamed namespace.
@@ -964,7 +964,7 @@ int get_omega(oenum_cso_era cso_era)
/// - The value at duration omega-1 equals unity.
std::vector<double> cso_table
- (oenum_cso_era cso_era
+ (mcenum_cso_era cso_era
,oenum_autopisty autopisty
,oenum_alb_or_anb alb_or_anb
,mcenum_gender gender
@@ -975,10 +975,10 @@ std::vector<double> cso_table
{
bool const is_anb = alb_or_anb != oe_age_last_birthday;
double const* p
- ((oe_1980cso == cso_era) ? q1980[is_anb][gender][smoking]
- :(oe_2001cso == cso_era) ? q2001[is_anb][gender][smoking]
- :(oe_2017cso == cso_era) ? q2017[is_anb][gender][smoking]
- : throw "invalid cso era"
+ ((mce_1980cso == cso_era) ? q1980[is_anb][gender][smoking]
+ :(mce_2001cso == cso_era) ? q2001[is_anb][gender][smoking]
+ :(mce_2017cso == cso_era) ? q2017[is_anb][gender][smoking]
+ : throw "invalid cso era"
);
int const sns_age = get_sns_age(cso_era, smoking);
int const omega = get_omega (cso_era );
@@ -995,7 +995,7 @@ std::vector<double> cso_table
if
(oe_heterodox == autopisty
- && oe_1980cso == cso_era
+ && mce_1980cso == cso_era
&& mce_nonsmoker == smoking
&& mce_male == gender
)
@@ -1028,7 +1028,7 @@ std::vector<double> cso_table
/// See the overload with more arguments for details.
std::vector<double> cso_table
- (oenum_cso_era cso_era
+ (mcenum_cso_era cso_era
,oenum_autopisty autopisty
,oenum_alb_or_anb alb_or_anb
,mcenum_gender gender
diff --git a/cso_table.hpp b/cso_table.hpp
index 5999ecb..249e261 100644
--- a/cso_table.hpp
+++ b/cso_table.hpp
@@ -31,7 +31,7 @@
#include <vector>
std::vector<double> LMI_SO cso_table
- (oenum_cso_era
+ (mcenum_cso_era
,oenum_autopisty
,oenum_alb_or_anb
,mcenum_gender
@@ -41,7 +41,7 @@ std::vector<double> LMI_SO cso_table
);
std::vector<double> LMI_SO cso_table
- (oenum_cso_era
+ (mcenum_cso_era
,oenum_autopisty
,oenum_alb_or_anb
,mcenum_gender
diff --git a/dbdict.cpp b/dbdict.cpp
index aebb5d0..6061de2 100644
--- a/dbdict.cpp
+++ b/dbdict.cpp
@@ -553,7 +553,7 @@ void DBDictionary::InitDB()
Add({DB_Effective7702DboRop , mce_option1_for_7702});
Add({DB_TermIsQABOrDb7702 , oe_7702_term_is_db});
Add({DB_TermIsQABOrDb7702A , oe_7702_term_is_db});
- Add({DB_CsoEra , oe_2017cso});
+ Add({DB_CsoEra , mce_2017cso});
Add({DB_CsoMisprint , oe_orthodox});
Add({DB_CoiInforceReentry , e_reenter_never});
Add({DB_SepAcctSpreadMethod , mce_spread_is_effective_annual});
@@ -690,7 +690,7 @@ sample::sample()
Add({DB_Irc7702NspTable , 0});
Add({DB_SevenPayTable , 10});
- Add({DB_CsoEra , oe_1980cso});
+ Add({DB_CsoEra , mce_1980cso});
// Following IRS Notice 88-128, use only the male and female
// tables with no smoker distinction, and a unisex table where
// required by state law.
diff --git a/gpt_test.cpp b/gpt_test.cpp
index b553a7f..2c74896 100644
--- a/gpt_test.cpp
+++ b/gpt_test.cpp
@@ -51,7 +51,7 @@ std::vector<double> a_to_m(std::vector<double> const& q_a)
std::vector<double> sample_q(int age)
{
static std::vector<double> const q_a = cso_table
- (oe_1980cso
+ (mce_1980cso
,oe_orthodox
,oe_age_nearest_birthday_ties_younger
,mce_male
diff --git a/irc7702_tables.cpp b/irc7702_tables.cpp
index ee17ff3..2d5c5b3 100644
--- a/irc7702_tables.cpp
+++ b/irc7702_tables.cpp
@@ -33,7 +33,7 @@
#include <cmath> // log()
irc7702_tables::irc7702_tables
- (oenum_cso_era cso_era
+ (mcenum_cso_era cso_era
,oenum_autopisty autopisty
,oenum_alb_or_anb alb_or_anb
,mcenum_gender gender
diff --git a/irc7702_tables.hpp b/irc7702_tables.hpp
index 661593a..4b82f26 100644
--- a/irc7702_tables.hpp
+++ b/irc7702_tables.hpp
@@ -36,7 +36,7 @@ class LMI_SO irc7702_tables final
public:
irc7702_tables
- (oenum_cso_era
+ (mcenum_cso_era
,oenum_autopisty
,oenum_alb_or_anb
,mcenum_gender
diff --git a/oecumenic_enumerations.hpp b/oecumenic_enumerations.hpp
index ed2227d..d419f73 100644
--- a/oecumenic_enumerations.hpp
+++ b/oecumenic_enumerations.hpp
@@ -76,12 +76,6 @@ enum oenum_autopisty
,oe_heterodox
};
-enum oenum_cso_era
- {oe_1980cso = 1980
- ,oe_2001cso = 2001
- ,oe_2017cso = 2017
- };
-
enum oenum_elasticity
{oe_inelastic
,oe_elastic
diff --git a/print_matrix_test.cpp b/print_matrix_test.cpp
index 88397cc..1d4dd10 100644
--- a/print_matrix_test.cpp
+++ b/print_matrix_test.cpp
@@ -33,7 +33,7 @@ namespace
std::vector<double> const& sample_q()
{
static std::vector<double> const q = cso_table
- (oe_1980cso
+ (mce_1980cso
,oe_orthodox
,oe_age_nearest_birthday_ties_younger
,mce_male
diff --git a/verify_products.cpp b/verify_products.cpp
index 94c72e2..e7992a8 100644
--- a/verify_products.cpp
+++ b/verify_products.cpp
@@ -61,7 +61,7 @@ class product_verifier
product_database const db0_ ;
int const min_age_ ;
product_database const db_ ;
- oenum_cso_era const era_ ;
+ mcenum_cso_era const era_ ;
oenum_alb_or_anb const a_b_ ;
int const t_ ;
bool const axis_g_ ;
@@ -99,7 +99,7 @@ product_verifier::product_verifier
,mce_medical
,mce_s_XX
)
- ,era_ {db_.query<oenum_cso_era >(DB_CsoEra)}
+ ,era_ {db_.query<mcenum_cso_era >(DB_CsoEra)}
,a_b_ {db_.query<oenum_alb_or_anb>(DB_AgeLastOrNearest)}
,t_ {db_.query<int >(DB_Irc7702QTable)}
,axis_g_ {db_.query<bool >(DB_Irc7702QAxisGender)}
- [lmi-commits] [lmi] master updated (712f0e7 -> 207dd79), Greg Chicares, 2019/08/11
- [lmi-commits] [lmi] master 4781b2b 2/6: Always prefer '<br>' to '<p></p>', Greg Chicares, 2019/08/11
- [lmi-commits] [lmi] master 0dc541e 3/6: Add an 'mc' enumeration for CSO era, Greg Chicares, 2019/08/11
- [lmi-commits] [lmi] master 61eb068 5/6: Add 'CsoEra' to ledger, Greg Chicares, 2019/08/11
- [lmi-commits] [lmi] master c01cedb 4/6: Replace an 'oe' with an 'mc' enumeration for CSO era,
Greg Chicares <=
- [lmi-commits] [lmi] master 4e37e2e 1/6: Revert "Demonstrate pilcrows-and-guillemets '.policy' syntax", Greg Chicares, 2019/08/11
- [lmi-commits] [lmi] master 207dd79 6/6: Use {{CsoEra}} in 'sample.policy', Greg Chicares, 2019/08/11