lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 074ed9e 07/14: Eliminate some local variables


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 074ed9e 07/14: Eliminate some local variables
Date: Thu, 18 Feb 2021 12:03:41 -0500 (EST)

branch: master
commit 074ed9ea25b38e436d22cbf56335902acda7828e
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Eliminate some local variables
---
 ihs_irc7702.cpp | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/ihs_irc7702.cpp b/ihs_irc7702.cpp
index e8c67ee..fb7b540 100644
--- a/ihs_irc7702.cpp
+++ b/ihs_irc7702.cpp
@@ -516,7 +516,6 @@ void Irc7702::InitCorridor()
 /// to use them.
 ///
 /// TAXATION !! Combine assertions and move to top for clarity.
-/// TAXATION !! Combine locals like ann_chg_pol and mly_chg_pol.
 /// TAXATION !! Eliminate aliasing references.
 /// TAXATION !! Rename '[46]Pct' to 'g[ls]p'.
 /// TAXATION !! Write a utility function for rotate-partial_sum_rotate.
@@ -532,19 +531,15 @@ void Irc7702::InitPvVectors(EIOBasis const& a_EIOBasis)
 
     // Present value of charges per policy
 
-    std::vector<double> ann_chg_pol(Length);
     LMI_ASSERT(Length == lmi::ssize(AnnChgPol));
     LMI_ASSERT(Length == lmi::ssize(comm_fns.aD()));
-    ann_chg_pol += AnnChgPol * comm_fns.aD();
 
-    std::vector<double> mly_chg_pol(Length);
     LMI_ASSERT(Length == lmi::ssize(MlyChgPol));
     LMI_ASSERT(Length <= lmi::ssize(comm_fns.kD()));
-    mly_chg_pol += MlyChgPol * comm_fns.kD();
 
     std::vector<double>& chg_pol = PvChgPol[a_EIOBasis];
     chg_pol.resize(Length);
-    chg_pol += ann_chg_pol + mly_chg_pol;
+    chg_pol += AnnChgPol * comm_fns.aD() + MlyChgPol * comm_fns.kD();
 
     // ET !! This is just APL written verbosely in a funny C++ syntax.
     // Perhaps we could hope for an expression-template library to do this:



reply via email to

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