[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 7cf8204 02/25: Add a 7702 interest-rate class
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 7cf8204 02/25: Add a 7702 interest-rate class |
Date: |
Wed, 24 Feb 2021 19:00:50 -0500 (EST) |
branch: master
commit 7cf8204af8d899d155eff505fff9ba81b665b84e
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Add a 7702 interest-rate class
---
irc7702_interest.cpp | 15 +++++++++++++--
irc7702_interest.hpp | 31 +++++++++++++++++++++++++++++--
2 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/irc7702_interest.cpp b/irc7702_interest.cpp
index 4595dde..59d322c 100644
--- a/irc7702_interest.cpp
+++ b/irc7702_interest.cpp
@@ -23,8 +23,10 @@
#include "irc7702_interest.hpp"
-#include "contains.hpp"
-#include "global_settings.hpp"
+#include "contains.hpp" // 7702 !! obsolescent
+#include "database.hpp"
+#include "global_settings.hpp" // 7702 !! obsolescent
+#include "stratified_charges.hpp"
/// Statutory interest rate for 7702 and 7702A (except GSP).
///
@@ -48,3 +50,12 @@ double igsp()
{
return 0.02 + iglp();
}
+
+i7702::i7702
+ (product_database const& database
+ ,stratified_charges const& stratified
+ )
+ :database_ {database}
+ ,stratified_ {stratified}
+{
+}
diff --git a/irc7702_interest.hpp b/irc7702_interest.hpp
index e59e553..0a5a892 100644
--- a/irc7702_interest.hpp
+++ b/irc7702_interest.hpp
@@ -26,7 +26,34 @@
#include "so_attributes.hpp"
-LMI_SO double iglp();
-LMI_SO double igsp();
+#include <vector>
+
+class LMI_SO_FWD_DECL product_database;
+class LMI_SO_FWD_DECL stratified_charges;
+
+LMI_SO double iglp(); // 7702 !! obsolescent
+LMI_SO double igsp(); // 7702 !! obsolescent
+
+class LMI_SO i7702 final
+{
+ public:
+ i7702
+ (product_database const&
+ ,stratified_charges const&
+ );
+ i7702(i7702 const&) = delete;
+ i7702& operator=(i7702 const&) = delete;
+ ~i7702() = default;
+
+ private:
+ product_database const& database_;
+ stratified_charges const& stratified_;
+
+ std::vector<double> spread_;
+
+ std::vector<double> gross_;
+ std::vector<double> net_glp_;
+ std::vector<double> net_gsp_;
+};
#endif // irc7702_interest_hpp
- [lmi-commits] [lmi] master 3ba52f9 01/25: Add a '7702 !!' marker for new 7702 issues, (continued)
- [lmi-commits] [lmi] master 3ba52f9 01/25: Add a '7702 !!' marker for new 7702 issues, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 447290e 04/25: Move an assertion; rewrite and duplicate its comment, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 5dbf2e3 06/25: Validate class i7702, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 2f74b41 25/25: Improve encapsulation of 7702 "spread", Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 3a06237 08/25: Deduplicate, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 3c341a6 10/25: Remove more dead code, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master e6f9397 14/25: Obtain DCV interest rate from i7702 object, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master d17fda2 20/25: Bring bogosity into focus before eradicating it, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master bbe2802 21/25: Reduce bogosity ever so slightly, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 8c27092 24/25: Use correct interest rates for '.mec' input, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 7cf8204 02/25: Add a 7702 interest-rate class,
Greg Chicares <=
- [lmi-commits] [lmi] master ef22f46 07/25: Deduplicate [295], Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 6bde573 12/25: Make certain shared_ptr members const, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master ee8667d 13/25: Turn a local variable into a member, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 9f5c39d 15/25: Expunge disused accessors, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 8db602c 16/25: Turn several members into local variables, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 87af00c 19/25: Support a further "refactoring", Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master ad762d4 18/25: Remove dead code, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master ec7093b 22/25: Eradicate global iglp() and igsp(), Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master bf5f2ba 23/25: Eradicate bogosity, Greg Chicares, 2021/02/24
- [lmi-commits] [lmi] master 84ea017 11/25: Localize 7702 spread in class BasicValues, Greg Chicares, 2021/02/24