-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow additional constraint for FittedBondDiscountCurve
#1753
Conversation
@@ -323,6 +329,11 @@ namespace QuantLib { | |||
return optimizationMethod_; | |||
} | |||
|
|||
inline Constraint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to return const Constraint&
to avoid a copy where not needed. Same with the other methods in this class in a future PR (doesn't have to be you).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cay, I have to ask—are you going to be a problem for this project? Because whatever someone's contributing is not worth causing other people to leave because they're insulted.
(Also, a word to the wise: even if you delete or edit comments, they are also sent via email to me and whoever commented on the PR.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Also, a word to the wise: even if you delete or edit comments, they are also sent via email to me and whoever commented on the PR.)
And also to everyone who turned on All Activity
in the notifications.
: constrainAtZero_(constrainAtZero), weights_(weights), l2_(std::move(l2)), | ||
calculateWeights_(weights.empty()), optimizationMethod_(std::move(optimizationMethod)), | ||
minCutoffTime_(minCutoffTime), maxCutoffTime_(maxCutoffTime) {} | ||
minCutoffTime_(minCutoffTime), maxCutoffTime_(maxCutoffTime), constraint_(constraint) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minCutoffTime_(minCutoffTime), maxCutoffTime_(maxCutoffTime), constraint_(constraint) {} | |
minCutoffTime_(minCutoffTime), maxCutoffTime_(maxCutoffTime), constraint_(std::move(constraint)) {} |
Same thing needs to be done for the other constructors.
That's ok, I can do those quick changes before merging. |
- avoid a few copies; - use initializer lists for readability; - use delegating constructors to reduce duplication
The constraint should be set to the underlying method instead.
FittedBondDiscountCurve
Cay, I don't know what you're going through, but you can do this in a civil way and stop abusing Jonathan, or you can get banned. Gently, of course. Your choice. This said, you're misunderstanding how copy elision works. Cases such as this are the reason |
Luigi,
I highly appreciate your doing.
And I appreciate UniCredit. For some thoughts.
And I don’t appreciate the arrogance of your students in Milano. In a – to be fair – not super exclusive university.
So. I don’t know what I appreciate. 😊
I appreciate QuantLib. I do.
But I won’t appreciate arrogance.
And I don’t think I will participate any further.
You Italians have a way of being very, very arrogant.
Yet your political system sucks ass: Silvio Berluscioni for 4 decades. Really?
Yet your political system does not kill people.
Like ours.
So we try our best to not let that happen ever again.
Best regards!
Cay
From: Luigi Ballabio ***@***.***>
Sent: Mittwoch, 2. August 2023 13:10
To: lballabio/QuantLib ***@***.***>
Cc: CayOest ***@***.***>; Author ***@***.***>
Subject: Re: [lballabio/QuantLib] Allow additional constraint for `FittedBondDiscountCurve` (PR #1753)
Cay, I don't know what you're going through, but you can do this in a civil way and stop abusing Jonathan, or you can get banned. Gently, of course. Your choice.
This said, you're misunderstanding how copy elision works. Cases such as this are the reason std::move was added to the standard.
—
Reply to this email directly, view it on GitHub <#1753 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOVJ27OLQHONEGRAUQBCAOTXTIYPFANCNFSM6AAAAAA27W5IFM> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AOVJ27NV3SL5W37YGCV5YYTXTIYPFA5CNFSM6AAAAAA27W5IFOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTDCBID4.gif> Message ID: ***@***.*** ***@***.***> >
|
Fwiw, I’m pretty sure I know how copy elision works. 😉
From: Luigi Ballabio ***@***.***>
Sent: Mittwoch, 2. August 2023 13:10
To: lballabio/QuantLib ***@***.***>
Cc: CayOest ***@***.***>; Author ***@***.***>
Subject: Re: [lballabio/QuantLib] Allow additional constraint for `FittedBondDiscountCurve` (PR #1753)
Cay, I don't know what you're going through, but you can do this in a civil way and stop abusing Jonathan, or you can get banned. Gently, of course. Your choice.
This said, you're misunderstanding how copy elision works. Cases such as this are the reason std::move was added to the standard.
—
Reply to this email directly, view it on GitHub <#1753 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AOVJ27OLQHONEGRAUQBCAOTXTIYPFANCNFSM6AAAAAA27W5IFM> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/AOVJ27NV3SL5W37YGCV5YYTXTIYPFA5CNFSM6AAAAAA27W5IFOWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTDCBID4.gif> Message ID: ***@***.*** ***@***.***> >
|
2nd try:
The Constraint is given by the constructor, not a setter method.