Closed joachimdahl closed 10 years ago
Sparse indexing and concatenation need to be fully revisited. At least someone is using these now!
Sorry, my example was buggy. I created the compressed structure directly, and the indices were not sorted...
Of course - in such a case you should use sparse
to construct the sparse matrix.
I agree... I had a compressed column-storage from C (unsorted), which I was importing...
On Wed, Nov 27, 2013 at 9:50 AM, Viral B. Shah notifications@github.comwrote:
Of course - in such a case you should use sparse to construct the sparse matrix.
— Reply to this email directly or view it on GitHubhttps://github.com/JuliaLang/julia/issues/4938#issuecomment-29368411 .
You can do a double transpose if you have an unsorted SparseMatrixCSC
and you will end up with a sorted one.
thanks, that actually ended up being my solution.
Let me congratulate with the efforts you have made so far with Julia. I have used it for a few weeks, and love everything about it. Before I used Python or Matlab to prototype numerical algorithms we work on at MOSEK, and Julia seems to be the perfect match for me.
On Wed, Nov 27, 2013 at 10:07 AM, Viral B. Shah notifications@github.comwrote:
You can do a double transpose if you have an unsorted SparseMatrixCSC and you will end up with a sorted one.
— Reply to this email directly or view it on GitHubhttps://github.com/JuliaLang/julia/issues/4938#issuecomment-29369295 .
Thanks. What is MOSEK? Great to see a pull request from you too, and all the stuff you are asking for is good stuff.
Is this www.mosek.com? In which case, I must Cc: @iainnz and @mlubin.
Glad to see Julia making a splash in the OR world!
Yes, we specialize in interior-point solvers for conic optimization.
On Wed, Nov 27, 2013 at 2:54 PM, Iain Dunning notifications@github.comwrote:
Glad to see Julia making a splash in the OR world!
— Reply to this email directly or view it on GitHubhttps://github.com/JuliaLang/julia/issues/4938#issuecomment-29385574 .
I noticed the following bug concatenating sparse matrices. I could not reproduce it using simpler matrices...
julia> A=SparseMatrixCSC(6,3,[1,2,3,4],[6,1,6],[-1.0,-1.0,1.0]) 6x3 sparse matrix with 3 Float64 nonzeros: [6, 1] = -1.0 [1, 2] = -1.0 [6, 3] = 1.0
julia> B=SparseMatrixCSC(6,5,[2,6,10,14,18,23], [6,1,2,3,6,1,4,5,6,1,4,5,6,1,2,3,6,1,2,3,4,5], [1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]) 6x5 sparse matrix with 22 Float64 nonzeros: [1, 1] = 1.0 [2, 1] = 1.0 [3, 1] = 1.0 [6, 1] = 1.0 [1, 2] = 1.0 [4, 2] = 1.0 [5, 2] = 1.0 [6, 2] = 1.0 [1, 3] = 1.0 [4, 3] = 1.0 [5, 3] = 1.0 [6, 3] = 1.0 [1, 4] = 1.0 [2, 4] = 1.0 [3, 4] = 1.0 [6, 4] = 1.0 [1, 5] = 1.0 [2, 5] = 1.0 [3, 5] = 1.0 [4, 5] = 1.0 [5, 5] = 1.0
julia> [A B] ERROR: tried to assign 23 elements to 22 destinations in error at error.jl:21 in setindex! at array.jl:435 in hcat at sparse/sparsematrix.jl:1265