Newton-Raphson method used in Curve adaptation#7
Open
teensp1rit wants to merge 1 commit intocedra-library:mainfrom
Open
Newton-Raphson method used in Curve adaptation#7teensp1rit wants to merge 1 commit intocedra-library:mainfrom
teensp1rit wants to merge 1 commit intocedra-library:mainfrom
Conversation
- Some target function derivation attempts left as deprecated as it might get useful in future - HolidayStorage CountBusinessDays between two dates Signed-off-by: ilya <iliya.alimov@gmail.com>
bersen66
approved these changes
Feb 27, 2026
Contributor
There was a problem hiding this comment.
В будущем может понадобиться PUBLIC, если код пользователя будет использовать компонент библиотеки:
cdr_cpp_library(
NAME math
HDRS
"newton_raphson/newton_raphson.h"
SRCS
"newton_raphson/newton_raphson.cc"
DEPS
cdr::base
cdr::types
PUBLIC # TO MAKE VISIBLE AFTER INSTALLING
)
| auto dpv_fixed = dPVFixed(curve, date, rate); | ||
| auto dpv_float = dPVFloat(curve, date, rate); | ||
| if (!dpv_fixed.has_value() || !dpv_float.has_value()) [[unlikely]] { | ||
| return std::nullopt; |
Contributor
There was a problem hiding this comment.
Мб Expect-ом сделать? Чтобы яснее было в чем проблема на стороне юзера
| [[nodiscard]] std::optional<f64> IrsContract::dPVFixed(Curve *curve, const DateType& date, Percent rate) const noexcept { | ||
| const auto& pillars = curve->Pillars(); | ||
| auto node = pillars.find(date); | ||
| CDR_CHECK(node != pillars.end()) << "date should be present"; |
Contributor
There was a problem hiding this comment.
Тут тоже, чтобы не дернулся std::terminate
| HolidayStorage* calendar_; | ||
| }; | ||
|
|
||
| class CurveBuilder { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #5