-
Notifications
You must be signed in to change notification settings - Fork 42
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 FillMaps #113
Add FillMaps #113
Conversation
Codecov Report
@@ Coverage Diff @@
## master #113 +/- ##
=======================================
Coverage 99.78% 99.79%
=======================================
Files 13 14 +1
Lines 950 988 +38
=======================================
+ Hits 948 986 +38
Misses 2 2
Continue to review full report at Codecov.
|
src/LinearMaps.jl
Outdated
LinearMap(λ::Number, M::Int, N::Int) = FillMap(λ, (M, N)) | ||
LinearMap(λ::Number, dims::Dims{2}) = FillMap(λ, dims) |
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 the only somewhat controversial things are these constructors. They are formally unambiguous, but are they unambiguous enough for users (sufficiently distinct from UniformScalinMap
constructor?)? Or should we export the FillMap
construct and not include these?
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.
As this is one of few the LinearMap
types that you want to construct explicitly, I guess it would make sense to export the FillMap
constructor explicitly. It's somewhat asymmetric that FunctionMap
is then still constructed via LinearMap
. Just using LinearMap(scalar, ...)
is also fine by me, no strong preference.
I do wonder what this is used for though :-) ?
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 don't know either what this is used for, but (a) there is an entire package (FillArrays.jl
) devoted to such arrays, and (b) I do notice that our simple imlementation of matvecmul and matmatmul is even faster than theirs.
And yes, I agree that this is so specific that it is perhaps better to have an explicit constructor. It was more "sentimentality" that made me consider keeping the "one constructor for all types" status.
4d20666
to
12b7711
Compare
adjust the documentation & write a docstring
write a
show
method specialization (after Introduce specific show methods, add Base.parent overload #87 is included)decide on constructor