[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master e52df17 1/6: Establish a data member to contr
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master e52df17 1/6: Establish a data member to control i7702 trace |
Date: |
Tue, 16 Mar 2021 20:20:10 -0400 (EDT) |
branch: master
commit e52df1717a98b1cb68423ee63b93a16768eac8ca
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Establish a data member to control i7702 trace
Soon a unit test will be added for i7702. It should be as simple as
possible, embodying only the algorithm, and not the means by which
parameters are retrieved. The optional console trace is integrated
with the algorithm, but the machinery for enabling it is a separable
concern.
---
i7702.cpp | 4 +++-
i7702.hpp | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/i7702.cpp b/i7702.cpp
index ce856a3..7d660fe 100644
--- a/i7702.cpp
+++ b/i7702.cpp
@@ -199,6 +199,7 @@ i7702::i7702
,std::vector<double> const& use_vlr
)
:length_ {length }
+ ,trace_ {false }
,A0_ {A0 }
,A1_ {A1 }
,Bgen_ {Bgen }
@@ -251,6 +252,7 @@ i7702::i7702
,stratified_charges const& stratified
)
:length_ {database.length()}
+ ,trace_ {contains(global_settings::instance().pyx(), "show_7702i")}
,A0_ {}
,A1_ {}
,Bgen_ (length_)
@@ -396,7 +398,7 @@ void i7702::initialize()
);
// 7702 !! temporary--for acceptance testing
- if(contains(global_settings::instance().pyx(), "show_7702i"))
+ if(trace_)
{
std::cout
<< "statutory rates {GLP,GSP}\n"
diff --git a/i7702.hpp b/i7702.hpp
index 156878f..9e05c57 100644
--- a/i7702.hpp
+++ b/i7702.hpp
@@ -79,7 +79,8 @@ class LMI_SO i7702 final
void initialize();
- int const length_;
+ int const length_;
+ bool const trace_;
// Rates from product database--member names are capitalized to
// match formulas in documentation, but suffixed to mark them as
- [lmi-commits] [lmi] master updated (60d683a -> f2a0fce), Greg Chicares, 2021/03/16
- [lmi-commits] [lmi] master e52df17 1/6: Establish a data member to control i7702 trace,
Greg Chicares <=
- [lmi-commits] [lmi] master 468d06c 3/6: Record speed measurements, Greg Chicares, 2021/03/16
- [lmi-commits] [lmi] master bcd3f13 5/6: Improve i7702 trace, Greg Chicares, 2021/03/16
- [lmi-commits] [lmi] master f2a0fce 6/6: Fix defect introduced 20050114T1947Z: wrong DCV NAAR discount, Greg Chicares, 2021/03/16
- [lmi-commits] [lmi] master 790cfc3 4/6: Expunge DB_BonusInt, Greg Chicares, 2021/03/16
- [lmi-commits] [lmi] master b677016 2/6: Add a 7702i unit test, Greg Chicares, 2021/03/16