-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 sparse constructors for special matrices #10843
add sparse constructors for special matrices #10843
Conversation
@@ -309,6 +309,28 @@ sparse(I,J,V::AbstractVector{Bool},m,n) = sparse(I, J, V, Int(m), Int(n), OrFun( | |||
|
|||
sparse(I,J,v::Number,m,n,combine::Union(Function,Func)) = sparse(I, J, fill(v,length(I)), Int(m), Int(n), combine) | |||
|
|||
function sparse(T::SymTridiagonal) | |||
m = length(T.dv) |
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.
please use spaces, not tabs
Fixes issue #10837 |
…ial_matrices add sparse constructors for special matrices
@bnels Thanks |
This should really not use the |
That will certainly be faster. |
It may be useful to have some helper functions to help create/modify CSC data structures that do some error checking and such. |
Added sparse constructors for SymTridiagonal, Tridiagonal, and Bidiagonal matrices
Added tests to sparse test file
Tests work.