You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you very much for the work you are doing on this package. It has greatly improved my academic productivity.
Would you have any documentation on the SplineSparse struct? How and when to use it? Playing a bit with your package, it seems that functions such as evalbase or row_kron are faster when dealing with SplineSparse, and I would like to take advantage of that.
PS: I realize that my question is very vague. I could try to make it more precise if that is helpful to you, but for the moment, any documentation would made me very content.
The text was updated successfully, but these errors were encountered:
The SplineSparse struct is something I created and haven't seen written up or documented anywhere.
The basic intuition is that for an order n spline approximation, each row of the basis matrix will be entirely zeros except for an n+1 set of contiguous columns. This means we can store the basis matrix by storing (n+1)*m values (where m is the number of rows) and m integers for which column is the first of the contiguous column range. Then when multiplying by a coefficient vector, we only need to do n+1 multiplications per row and sum the result.
If stored as a dense matrix we would do a full dot product with all the zero's from the basis matrix -- resulting in zero.
If stored as a standard sparse matrix, we wouldn't leverage the special structure of having only a contiguous range of columns and would suffer some "random access" indexing performance penalties
Things get a little more complicated in multiple dimensions -- for each dimension you end up with a contiguous range of non-zero columns. That is also handled here.
I realize that isn't very precise or detailed, but hopefully it gives some intuitions for what SplineSparse does and how it is implemented!
Dear Chase and Spencer,
First of all, thank you very much for the work you are doing on this package. It has greatly improved my academic productivity.
Would you have any documentation on the
SplineSparse
struct? How and when to use it? Playing a bit with your package, it seems that functions such asevalbase
orrow_kron
are faster when dealing withSplineSparse
, and I would like to take advantage of that.PS: I realize that my question is very vague. I could try to make it more precise if that is helpful to you, but for the moment, any documentation would made me very content.
The text was updated successfully, but these errors were encountered: