[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master b4eb422 02/14: Rename a variable
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master b4eb422 02/14: Rename a variable |
Date: |
Sun, 6 Sep 2020 07:50:36 -0400 (EDT) |
branch: master
commit b4eb4222b08dbc0cea56292e9abec23e47424155
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Rename a variable
Soon, a congener will be established for the actuarial quantity "lx".
"lx" is the mot juste: it's not "tpx" because it's multiplied by a
"radix", and "Lx" is something different. However, a name like
"partial_mortality_l" may too easily be misread as ending in "_1";
"partial_mortality_lx" is less easily misread. For concinnity, then,
"q" should be "qx".
---
account_value.hpp | 2 +-
ihs_acctval.cpp | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/account_value.hpp b/account_value.hpp
index f3705f2..55b5ec0 100644
--- a/account_value.hpp
+++ b/account_value.hpp
@@ -583,7 +583,7 @@ class LMI_SO AccountValue final
double YearsTotalSpecAmtLoad;
double YearsTotalSepAcctLoad;
- std::vector<double> partial_mortality_q;
+ std::vector<double> partial_mortality_qx;
// For experience rating.
double CoiRetentionRate;
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 29b6ff4..c0b9dfd 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -424,7 +424,7 @@ void AccountValue::InitializeLife(mcenum_run_basis a_Basis)
( lmi::ssize(InvariantValues().InforceLives)
== 1 + BasicValues::GetLength()
);
- partial_mortality_q.resize(BasicValues::GetLength());
+ partial_mortality_qx.resize(BasicValues::GetLength());
// TODO ?? 'InvariantValues().InforceLives' may be thought of as
// counting potential inforce lives: it does not reflect lapses.
// It should either reflect lapses or be renamed. Meanwhile,
@@ -436,8 +436,8 @@ void AccountValue::InitializeLife(mcenum_run_basis a_Basis)
InvariantValues().InforceLives[0] = inforce_lives;
for(int j = 0; j < BasicValues::GetLength(); ++j)
{
- partial_mortality_q[j] = GetPartMortQ(j);
- inforce_lives *= 1.0 - partial_mortality_q[j];
+ partial_mortality_qx[j] = GetPartMortQ(j);
+ inforce_lives *= 1.0 - partial_mortality_qx[j];
InvariantValues().InforceLives[1 + j] = inforce_lives;
}
}
@@ -1098,9 +1098,9 @@ void AccountValue::SetClaims()
TxSetDeathBft();
TxSetTermAmt();
- YearsGrossClaims = partial_mortality_q[Year] * DBReflectingCorr;
- YearsAVRelOnDeath = partial_mortality_q[Year] * TotalAccountValue();
- YearsLoanRepaidOnDeath = partial_mortality_q[Year] * (RegLnBal + PrfLnBal);
+ YearsGrossClaims = partial_mortality_qx[Year] * DBReflectingCorr;
+ YearsAVRelOnDeath = partial_mortality_qx[Year] * TotalAccountValue();
+ YearsLoanRepaidOnDeath = partial_mortality_qx[Year] * (RegLnBal +
PrfLnBal);
YearsDeathProceeds = material_difference
(YearsGrossClaims
,YearsLoanRepaidOnDeath
- [lmi-commits] [lmi] master updated (c4f84b4 -> 59860e3), Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 123b572 01/14: Avoid reading back from ledger in class AccountValue, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master b4eb422 02/14: Rename a variable,
Greg Chicares <=
- [lmi-commits] [lmi] master 14c2920 07/14: Factor out partial-mortality calculations, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 338d589 10/14: Call set_partial_mortality() OAOO, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 915e4ef 03/14: Avoid reading back from ledger in class AccountValue, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 540e3ca 04/14: Simplify, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 73d5f2b 06/14: Refactor for terseness, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 2bcf8d3 08/14: Move commentary outside function body, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 7b9b0cf 11/14: Resolve a marked defect [339], Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 3cbd888 12/14: Improve documentation, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 3ff6e18 13/14: Add and use trivial const accessors, Greg Chicares, 2020/09/06
- [lmi-commits] [lmi] master 1f2d652 05/14: Calculate and store partial-mortality tpx along with lx, Greg Chicares, 2020/09/06