[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 140c288 05/14: Remove dead code [304]
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 140c288 05/14: Remove dead code [304] |
Date: |
Thu, 18 Feb 2021 12:03:40 -0500 (EST) |
branch: master
commit 140c28829a95107bb5147d68b0f7130433984fbe
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Remove dead code [304]
See '7702.html' [14.3/5]. This difference:
(LoadTgt[t] − LoadExc[t]) × aD[t]
had been calculated and stored, but never used. It would have been used
in Irc7702::CalculatePremium(), where it's just a scalar subtraction,
which is not so costly as to justify calculating and storing the
difference for every possible index t.
---
ihs_irc7702.cpp | 17 -----------------
ihs_irc7702.hpp | 3 ---
2 files changed, 20 deletions(-)
diff --git a/ihs_irc7702.cpp b/ihs_irc7702.cpp
index 76bc385..1211d66 100644
--- a/ihs_irc7702.cpp
+++ b/ihs_irc7702.cpp
@@ -520,7 +520,6 @@ void Irc7702::InitCorridor()
/// TAXATION !! Eliminate aliasing references.
/// TAXATION !! Rename '[46]Pct' to 'g[ls]p'.
/// TAXATION !! Write a utility function for rotate-partial_sum_rotate.
-/// TAXATION !! Eliminate PvLoadDiff{Sgl,Lvl} if unneeded.
/// TAXATION !! Add unit tests.
void Irc7702::InitPvVectors(EIOBasis const& a_EIOBasis)
@@ -624,22 +623,6 @@ void Irc7702::InitPvVectors(EIOBasis const& a_EIOBasis)
std::reverse(npf_lvl_exc.begin(), npf_lvl_exc.end());
std::partial_sum(npf_lvl_exc.begin(), npf_lvl_exc.end(),
npf_lvl_exc.begin());
std::reverse(npf_lvl_exc.begin(), npf_lvl_exc.end());
-
- // Present value of target premium load - excess premium load
-
- std::vector<double>& diff_sgl = PvLoadDiffSgl[a_EIOBasis];
- diff_sgl.resize(Length);
- LMI_ASSERT(Length == lmi::ssize(diff_sgl));
- LMI_ASSERT(Length == lmi::ssize(npf_sgl_exc));
- LMI_ASSERT(Length == lmi::ssize(npf_sgl_tgt));
- diff_sgl += npf_sgl_exc - npf_sgl_tgt;
-
- std::vector<double>& diff_lvl = PvLoadDiffLvl[a_EIOBasis];
- diff_lvl.resize(Length);
- LMI_ASSERT(Length == lmi::ssize(diff_lvl));
- std::reverse(diff_lvl.begin(), diff_lvl.end());
- std::partial_sum(diff_lvl.begin(), diff_lvl.end(), diff_lvl.begin());
- std::reverse(diff_lvl.begin(), diff_lvl.end());
}
/// For illustrations, we can't initialize everything in the ctor.
diff --git a/ihs_irc7702.hpp b/ihs_irc7702.hpp
index c6d5ef3..5f2d1a1 100644
--- a/ihs_irc7702.hpp
+++ b/ihs_irc7702.hpp
@@ -256,9 +256,6 @@ class Irc7702 final
std::vector<double> PvNpfLvlTgt [NumIOBases];
std::vector<double> PvNpfSglExc [NumIOBases];
std::vector<double> PvNpfLvlExc [NumIOBases];
-// TODO ?? TAXATION !! Not necessary?
- std::vector<double> PvLoadDiffSgl [NumIOBases];
- std::vector<double> PvLoadDiffLvl [NumIOBases];
};
// TAXATION !! Update this, and move it to a better location.
- [lmi-commits] [lmi] master updated (f0a4840 -> 7dd2680), Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master 2e84c56 03/14: Rearrange comments, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master 5623352 06/14: Remove pointless assertions, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master 140c288 05/14: Remove dead code [304],
Greg Chicares <=
- [lmi-commits] [lmi] master 3edb81f 12/14: Add and use a backward-summation function template, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master bff8d5b 04/14: Note a possible defect, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master 387657b 08/14: Move assertions upward, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master 074ed9e 07/14: Eliminate some local variables, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master 18a189a 11/14: Remove duplicate assertions, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master cef60d4 09/14: Strengthen assertions, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master 9c580de 01/14: Improve documentation, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master 80fce3e 02/14: Rename a member function for clarity, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master 837c225 10/14: Sort assertions, Greg Chicares, 2021/02/18
- [lmi-commits] [lmi] master 0b76da4 13/14: Say why certain headers are included, Greg Chicares, 2021/02/18