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.
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 API functions for the other kinds of matrixes that a CRN ODE system can be factored into #1134
base: master
Are you sure you want to change the base?
Add API functions for the other kinds of matrixes that a CRN ODE system can be factored into #1134
Changes from 22 commits
e3c9d33
17d1cd5
9e23705
f8df438
389d09a
7d6cbf5
4922561
536a50d
835b4ff
b89329a
4a691b4
211ac81
3bdf298
3128628
b921fed
c82c80e
fcab9c3
cf89a29
77b606f
e5eec18
6e68436
7487e0d
b3dce88
b777518
a782851
32deeea
3f1d1ca
ce8e110
8551454
a6d924a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Should this be
Num
and not the unwrapped type?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 has to, doesn't seem like it's actually possible to have zeros in this matrix if the eltype is
BasicSymbolic
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.
Can't it by type
Any
?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.
Is that better than being
Num
? I assumed more specific was betterThere 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.
We don't want to return mixtures of Nums and non-Nums across different methods, so we should not re-wrap internal symbolics.
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.
Actually this creates some issues for the sparse method (can't really do any arithmetic with a
SparseMatrixCSC{Any, T}
since zero(Any) is undefined). WouldUnion{Float64, BasicSymbolic}
be okay? If not it might just be better to define two functions, one symbolic and one numericThere 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.
If you want to internally use Num I guess that is ok, but yeah, we should unwrap before returning to users for consistency.
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.
What about returning a
Union
as the element type?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.
Actually that doesn't work, nevermind, when you find the Laplacian matrix (D*K) type inference infers its eltype as Any anyway. Since it's the sparse matrix support that's causing the issue I think it might just be better to not allow the sparse kwarg for now
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.
Alright, I guess just stick with
Num
. But please add documentation about this and why it is needed to the function doctrings.