Re: [julia-users] Re: higher rank sparse matrices

2016-08-21 Thread Tim Holy
Perhaps https://github.com/JuliaComputing/NDSparseData.jl? --Tim On Sunday, August 21, 2016 8:14:48 AM CDT Kristof Cools wrote: > Just wondering whether there have emerged any packages for this in the > meantime. I need a rank 3 sparse matrix to implement a retarded potential > integral equation

[julia-users] Re: higher rank sparse matrices

2016-08-21 Thread Kristof Cools
Just wondering whether there have emerged any packages for this in the meantime. I need a rank 3 sparse matrix to implement a retarded potential integral equation solver. The structure will have non zero entries for all values of the first two indices and a varying but fixed length set for the

[julia-users] Re: higher rank sparse matrices

2015-09-16 Thread Frank Kampas
On Tuesday, September 15, 2015 at 11:02:26 PM UTC-4, Jack Poulson wrote: > > I believe that Tony is suggesting manually applying the sparse operator > rather than explicitly constructing it and then applying it. This is a > common (and significant) performance optimization when a sparse

[julia-users] Re: higher rank sparse matrices

2015-09-15 Thread Jack Poulson
I believe that Tony is suggesting manually applying the sparse operator rather than explicitly constructing it and then applying it. This is a common (and significant) performance optimization when a sparse operator is only used once or twice, as the construction of the sparse matrix is often

[julia-users] Re: higher rank sparse matrices

2015-09-15 Thread Tony Kelman
Instead of constructing a sparse matrix in the inner loop it would be more efficient to write an in place stencil kernel function to perform the equivalent operation.

[julia-users] Re: higher rank sparse matrices

2015-09-15 Thread Frank Kampas
Could you post a link to the part of the documentation that describes how to do that? On Tuesday, September 15, 2015 at 3:53:11 AM UTC-4, Tony Kelman wrote: > > Instead of constructing a sparse matrix in the inner loop it would be more > efficient to write an in place stencil kernel function to

[julia-users] Re: higher rank sparse matrices

2015-09-13 Thread Frank Kampas
I'm doing sequential linear programming on quadratic constraints. Using matrices makes this much more straight-forward. Without 4th rank matrices, I have to generate a large number of 2nd rank matrices for every iteration. However, I gather from your answer that only 2nd rank sparse matrices

[julia-users] Re: higher rank sparse matrices

2015-09-13 Thread Tony Kelman
There aren't built-in data structures defined in Julia's standard library right now for higher-dimensional sparse matrices, no. But you can certainly come up with your own data structure and use it however you like. Are there any dimensions in your problem along which every 2-dimensional slice

[julia-users] Re: higher rank sparse matrices

2015-09-13 Thread Frank Kampas
This is the code that uses sparse matrices: for i = 1:n for j = i:n if i == j sp = start'*sparse([i,n+i,2n+1],[i,n+i,2n+1],[1,1,-1]) lhs[rctr,:] = -2*sp -2*radii[i]*c rhs[rctr] = -(sp*start)[1] -radii[i]^2

[julia-users] Re: higher rank sparse matrices

2015-09-12 Thread Sisyphuss
Doesn't 'diag([1,1,1])` have a rank of 3? On Saturday, September 12, 2015 at 6:09:11 PM UTC+2, Frank Kampas wrote: > > Is it possible to create sparse matrices with a rank other than 2? >

[julia-users] Re: higher rank sparse matrices

2015-09-12 Thread Frank Kampas
On Saturday, September 12, 2015 at 12:09:11 PM UTC-4, Frank Kampas wrote: > > Is it possible to create sparse matrices with a rank other than 2? > I've been using 4th rank sparse matrices in Mathematica for circle packing. The constraints can be expressed using 2nd rank matrices and

[julia-users] Re: higher rank sparse matrices

2015-09-12 Thread Tony Kelman
In JuMP you can do indexing over constraints and variables with any number of indexes. You probably don't need to worry about explicitly forming constraint matrices at all, since the flattened individual indexes of optimization variables and constraints are somewhat arbitrary and will mostly