[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 200e756 03/22: Clarify documentation
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 200e756 03/22: Clarify documentation |
Date: |
Sun, 6 Jun 2021 21:37:59 -0400 (EDT) |
branch: master
commit 200e75696c8dfc17fcf0bab7c0548be3aafa9bc4
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Clarify documentation
Explicitly state that "final solve parameters are stored now" means
calling the particular function that stores them, and nothing more.
State this where that particular function is called.
---
ihs_avsolve.cpp | 11 ++++++-----
solve.cpp | 14 +++++++-------
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/ihs_avsolve.cpp b/ihs_avsolve.cpp
index 13fd8e0..741d226 100644
--- a/ihs_avsolve.cpp
+++ b/ihs_avsolve.cpp
@@ -468,15 +468,16 @@ currency AccountValue::Solve
// TODO ?? What can we do when no solution exists for guar prem?
}
}
+ currency const solution_cents = round_minutiae().c(solution.first);
+
+ Solving = false;
// The account and ledger values set as a side effect of solving
// aren't generally the same as those shown on the illustration
// because the 'Solving' flag has side effects. Therefore, the
- // final solve parameters are stored now, and actual values are
- // freshly generated downstream.
-
- Solving = false;
- currency const solution_cents = round_minutiae().c(solution.first);
+ // final solve parameters are stored by calling 'solve_set_fn'
+ // now, and actual values are freshly generated downstream.
(this->*solve_set_fn)(solution_cents);
+
return solution_cents;
}
diff --git a/solve.cpp b/solve.cpp
index 53fbe74..3f196e4 100644
--- a/solve.cpp
+++ b/solve.cpp
@@ -335,12 +335,7 @@ currency AccountValue::Solve()
LMI_ASSERT(0.0 == Solution.first);
warning() << "Solution not found. Using zero instead." << LMI_FLUSH;
}
-
- // The account and ledger values set as a side effect of solving
- // aren't generally the same as those shown on the illustration
- // because the 'Solving' flag has side effects. Therefore, the
- // final solve parameters are stored now, and actual values are
- // freshly generated downstream.
+ currency const solution_cents = round_to_cents.c(Solution.first);
Solving = false;
@@ -350,7 +345,12 @@ currency AccountValue::Solve()
// kludge, but so is 'That'; a function object is wanted instead.
only_set_values = !Solving;
- currency const solution_cents = round_to_cents.c(Solution.first);
+ // The account and ledger values set as a side effect of solving
+ // aren't generally the same as those shown on the illustration
+ // because the 'Solving' flag has side effects. Therefore, the
+ // final solve parameters are stored by calling 'SolveFn'
+ // now, and actual values are freshly generated downstream.
SolveFn(dblize(solution_cents));
+
return solution_cents;
}
- [lmi-commits] [lmi] master 99aebcc 07/22: Treat decimal_root return value more flexibly, (continued)
- [lmi-commits] [lmi] master 99aebcc 07/22: Treat decimal_root return value more flexibly, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 5c31ab3 09/22: Fix latent unit-test errors, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 2391573 11/22: Rename a variable, for terseness, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master b14e318 18/22: Adjust tolerance for a particular unit-test function, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 1c448d8 20/22: Augment decimal_root()'s return type, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 53c3513 21/22: Reorder unit tests, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 5cf534c 04/22: Constify, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 3865416 10/22: Rearrange certain unit tests, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 1f8316c 16/22: Test actual return value, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 3d4adb3 17/22: Clarify, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 200e756 03/22: Clarify documentation,
Greg Chicares <=
- [lmi-commits] [lmi] master 1b0ed06 12/22: Change argument order, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 86661b6 22/22: Validate number of iterations, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 9027fef 13/22: Refactor, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master c1a020a 14/22: Include appropriate headers, and say why they're included, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 4d9ed2d 19/22: Abstract the Brent error limit, Greg Chicares, 2021/06/06
- [lmi-commits] [lmi] master 776f09c 15/22: Return a struct rather than a std::pair, Greg Chicares, 2021/06/06