lmi-commits
[Top][All Lists]
Advanced

[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_;



reply via email to

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