-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add 5 arguments mul! #146
Add 5 arguments mul! #146
Conversation
Codecov Report
@@ Coverage Diff @@
## master #146 +/- ##
==========================================
+ Coverage 96.32% 96.34% +0.02%
==========================================
Files 14 14
Lines 625 630 +5
==========================================
+ Hits 602 607 +5
Misses 23 23
Continue to review full report at Codecov.
|
Is this a |
Yes, it's a feature of Julia |
# y ⇽ α * op * x + β * y | ||
function mul!(y :: AbstractVector, op :: AbstractLinearOperator, x :: AbstractVector, α :: Number, β :: Number) | ||
β ≠ 0 && (y .*= β) | ||
α ≠ 0 && (y .+= α .* (op * x)) |
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.
Does this assume that op
Is able to directly update y
? That's how it works with matrices I think.
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.
No, one vector is allocated (or already preallocated) for op * x
product and after y
is updated.
Maybe operators should be defined by the 5-arg |
Yes, it's a good idea. |
Frankly, I have to say that I strongly dislike the |
I think it's just for compatibility in other packages, in case someone decides to use it. Since matrices will support them, we might as well have it. |
Compatibility with what though? Has there been demand for this? If it still allocates a vector, what is the advantage? |
Yes, you're right Abel, we don't need to drop < 1.3. I think it's still relevant to have it like the 3-arguments |
I continue to think that it would be better to define operators with a 5-arg |
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.
Let's put this on hold temporarily.
superseded by #180 |
No description provided.