-
Notifications
You must be signed in to change notification settings - Fork 39
add counters for products #119
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
Conversation
abelsiqueira
left a comment
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.
Thanks, Dominique. I've asked for an additional test, because of my coverage fever, but I'm gonna approve the PR.
| end | ||
| @test nprod(op) == nprods | ||
| @test ntprod(op) == ntprods | ||
| @test nctprod(op) == nctprods |
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.
Could add a test here for transpose, adjoint and conjugate operators? So we can cover these lines. 💯
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.
Good idea. Done. Thanks.
Codecov Report
@@ Coverage Diff @@
## master #119 +/- ##
==========================================
+ Coverage 96.58% 96.66% +0.08%
==========================================
Files 6 6
Lines 527 570 +43
==========================================
+ Hits 509 551 +42
- Misses 18 19 +1
Continue to review full report at Codecov.
|
closes #47
|
I made a few changes and introduced an "API" to increase counters. That'll be useful in the next PR. |
|
|
||
| increase_nprod(op::AbstractLinearOperator) = (op.nprod += 1) | ||
| increase_ntprod(op::AbstractLinearOperator) = (op.ntprod += 1) | ||
| increase_nctprod(op::AbstractLinearOperator) = (op.nctprod += 1) |
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 you need to define it for Adjoint, Transpose and Conjugate as well
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.
You're right. It's a non-issue at this point because we're not wrapping operators into other operators, but it will be done in the next PR.
closes #47