[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 0d512f5 6/9: Add a never-before-implemented v
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 0d512f5 6/9: Add a never-before-implemented variable |
Date: |
Thu, 4 Oct 2018 13:00:40 -0400 (EDT) |
branch: master
commit 0d512f51347d4aa4e9ec8adcab4805e7195ecece
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Add a never-before-implemented variable
"Policy year", by convention, begins at one. It's useful to provide
"Duration" (which was already in the format map) as an alternative
for those who think in origin zero.
---
ledger_evaluator.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/ledger_evaluator.cpp b/ledger_evaluator.cpp
index 4c4f40d..0605d3b 100644
--- a/ledger_evaluator.cpp
+++ b/ledger_evaluator.cpp
@@ -196,6 +196,7 @@ ledger_evaluator Ledger::make_evaluator() const
title_map["DacTaxRsv_Guaranteed" ] = "Guar DAC\nTax\nReserve";
title_map["DeathProceedsPaid_Current" ] = "Curr
Death\nProceeds\nPaid";
title_map["DeathProceedsPaid_Guaranteed" ] = "Guar
Death\nProceeds\nPaid";
+ title_map["Duration" ] = "Duration";
title_map["EOYDeathBft_Current" ] = "Curr EOY\nDeath\nBenefit";
title_map["EOYDeathBft_Guaranteed" ] = "Guar EOY\nDeath\nBenefit";
title_map["EeGrossPmt" ] = "EE Gross\nPayment";
@@ -333,6 +334,7 @@ ledger_evaluator Ledger::make_evaluator() const
mask_map ["DacTaxRsv_Guaranteed" ] = "999,999,999";
mask_map ["DeathProceedsPaid_Current" ] = "999,999,999";
mask_map ["DeathProceedsPaid_Guaranteed" ] = "999,999,999";
+ mask_map ["Duration" ] = "999";
mask_map ["EOYDeathBft_Current" ] = "999,999,999";
mask_map ["EOYDeathBft_Guaranteed" ] = "999,999,999";
mask_map ["EeGrossPmt" ] = "999,999,999";
@@ -697,13 +699,16 @@ ledger_evaluator Ledger::make_evaluator() const
int max_duration = static_cast<int>(MaxDuration);
int issue_age = static_cast<int>(ledger_invariant_->Age);
- std::vector<double> PolicyYear (max_duration);
std::vector<double> AttainedAge(max_duration);
- std::iota(PolicyYear .begin(), PolicyYear .end(), 1);
+ std::vector<double> Duration (max_duration);
+ std::vector<double> PolicyYear (max_duration);
std::iota(AttainedAge.begin(), AttainedAge.end(), 1 + issue_age);
+ std::iota(Duration .begin(), Duration .end(), 0);
+ std::iota(PolicyYear .begin(), PolicyYear .end(), 1);
// TODO ?? An attained-age column is meaningless in a composite. So
// are several others--notably those affected by partial mortaility.
vectors["AttainedAge"] = &AttainedAge;
+ vectors["Duration" ] = &Duration ;
vectors["PolicyYear" ] = &PolicyYear ;
vectors["InforceLives"] = &ledger_invariant_->InforceLives;
- [lmi-commits] [lmi] master updated (8705e80 -> b3e084f), Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master c7a13c2 3/9: Reorder function definitions, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master 21a3007 1/9: Designate release candidate 20181003T2110Z, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master 1e6dcc0 4/9: Throw earlier and unconditionally if interdicted, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master f81c6b5 8/9: Fix defect introduced 20180930T1741Z: missing format, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master 0d512f5 6/9: Add a never-before-implemented variable,
Greg Chicares <=
- [lmi-commits] [lmi] master b3e084f 9/9: Designate release candidate 20181004T1656Z, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master 63e87a7 7/9: Note a shortcoming, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master 385378e 5/9: Expunge format for a nonexistent entity, Greg Chicares, 2018/10/04
- [lmi-commits] [lmi] master 691e6b1 2/9: Refactor, Greg Chicares, 2018/10/04