[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 3b39e4e 03/10: Add new i7702 members
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 3b39e4e 03/10: Add new i7702 members |
Date: |
Thu, 11 Mar 2021 21:12:35 -0500 (EST) |
branch: master
commit 3b39e4e2ba2b1ec904daee89576c42a40fc3690d
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Add new i7702 members
---
i7702.cpp | 40 ++++++++++++++++++++++++++++++++++++++++
i7702.hpp | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 84 insertions(+)
diff --git a/i7702.cpp b/i7702.cpp
index f398003..a72109b 100644
--- a/i7702.cpp
+++ b/i7702.cpp
@@ -154,6 +154,42 @@
/// use contractual rates if greater
i7702::i7702
+ (std::vector<double> const& A0
+ ,std::vector<double> const& A1
+ ,std::vector<double> const& Bgen
+ ,std::vector<double> const& Bsep
+ ,std::vector<double> const& Bflr
+ ,std::vector<double> const& Bvlr
+ ,std::vector<double> const& Cgen
+ ,std::vector<double> const& Csep
+ ,std::vector<double> const& Cflr
+ ,std::vector<double> const& Cvlr
+ ,std::vector<double> const& Dgen
+ ,std::vector<double> const& Dsep
+ ,std::vector<double> const& Dflr
+ ,std::vector<double> const& Dvlr
+ ,std::vector<double> const& E
+ )
+ :A0_ {A0 }
+ ,A1_ {A1 }
+ ,Bgen_ {Bgen}
+ ,Bsep_ {Bsep}
+ ,Bflr_ {Bflr}
+ ,Bvlr_ {Bvlr}
+ ,Cgen_ {Cgen}
+ ,Csep_ {Csep}
+ ,Cflr_ {Cflr}
+ ,Cvlr_ {Cvlr}
+ ,Dgen_ {Dgen}
+ ,Dsep_ {Dsep}
+ ,Dflr_ {Dflr}
+ ,Dvlr_ {Dvlr}
+ ,E_ {E }
+{
+ initialize();
+}
+
+i7702::i7702
(product_database const& database
,stratified_charges const& stratified
)
@@ -282,3 +318,7 @@ i7702::i7702
);
ig_ = no_naar_discount ? zero : operative_naar_discount;
}
+
+void i7702::initialize()
+{
+}
diff --git a/i7702.hpp b/i7702.hpp
index 0c3afec..47abf6e 100644
--- a/i7702.hpp
+++ b/i7702.hpp
@@ -33,11 +33,14 @@ class LMI_SO_FWD_DECL stratified_charges;
class LMI_SO i7702 final
{
+ friend struct i7702_test;
+
public:
i7702
(product_database const&
,stratified_charges const&
);
+
i7702(i7702 const&) = delete;
i7702& operator=(i7702 const&) = delete;
~i7702() = default;
@@ -48,6 +51,47 @@ class LMI_SO i7702 final
std::vector<double> const& net_gsp() const {return net_gsp_;}
private:
+ // Private ctor for unit test.
+ i7702
+ (std::vector<double> const& A0
+ ,std::vector<double> const& A1
+ ,std::vector<double> const& Bgen
+ ,std::vector<double> const& Bsep
+ ,std::vector<double> const& Bflr
+ ,std::vector<double> const& Bvlr
+ ,std::vector<double> const& Cgen
+ ,std::vector<double> const& Csep
+ ,std::vector<double> const& Cflr
+ ,std::vector<double> const& Cvlr
+ ,std::vector<double> const& Dgen
+ ,std::vector<double> const& Dsep
+ ,std::vector<double> const& Dflr
+ ,std::vector<double> const& Dvlr
+ ,std::vector<double> const& E
+ );
+
+ void initialize();
+
+ // Parameters from product database--member names are
+ // capitalized to match formulas in documentation, but
+ // suffixed to mark them as members.
+ std::vector<double> A0_ ;
+ std::vector<double> A1_ ;
+ std::vector<double> Bgen_ ;
+ std::vector<double> Bsep_ ;
+ std::vector<double> Bflr_ ;
+ std::vector<double> Bvlr_ ;
+ std::vector<double> Cgen_ ;
+ std::vector<double> Csep_ ;
+ std::vector<double> Cflr_ ;
+ std::vector<double> Cvlr_ ;
+ std::vector<double> Dgen_ ;
+ std::vector<double> Dsep_ ;
+ std::vector<double> Dflr_ ;
+ std::vector<double> Dvlr_ ;
+ std::vector<double> E_ ;
+
+ // Derived 7702 interest rates.
std::vector<double> ig_ ;
std::vector<double> gross_ ;
std::vector<double> net_glp_;
- [lmi-commits] [lmi] master updated (986ba37 -> 5d0c118), Greg Chicares, 2021/03/11
- [lmi-commits] [lmi] master eb0729d 01/10: Refine documentation, Greg Chicares, 2021/03/11
- [lmi-commits] [lmi] master 8b21622 05/10: Conditionalize sepacct load consistently, Greg Chicares, 2021/03/11
- [lmi-commits] [lmi] master 7b84df9 08/10: Move a commentary paragraph, Greg Chicares, 2021/03/11
- [lmi-commits] [lmi] master 55b91b6 09/10: Discuss monthly vs. annual rates, for ig especially, Greg Chicares, 2021/03/11
- [lmi-commits] [lmi] master 469b63a 02/10: Expunge needless data members, Greg Chicares, 2021/03/11
- [lmi-commits] [lmi] master 3b39e4e 03/10: Add new i7702 members,
Greg Chicares <=
- [lmi-commits] [lmi] master 11041f1 06/10: Simplify an idiosyncratic gnarl, Greg Chicares, 2021/03/11
- [lmi-commits] [lmi] master 5d0c118 10/10: Refactor, Greg Chicares, 2021/03/11
- [lmi-commits] [lmi] master e9a5eb0 04/10: Replace some local variables with members, Greg Chicares, 2021/03/11
- [lmi-commits] [lmi] master 0d51b6d 07/10: Refactor, Greg Chicares, 2021/03/11