-
Notifications
You must be signed in to change notification settings - Fork 3
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
Select output type of sparsity pattern #14
Comments
Indeed, Do you have a problem in mind in which you expect the Jacobian to have a specific structure? It would be easy to add more wrappers like I have an idea for a second-order Tracer for sparsity detection in Hessians, which will return a sparse symmetric matrix. |
Control problems sometimes have pretty nice banded structures - I am starting a class project where I plan to leverage it I will follow up with more concrete details once I start putting together code for that 😅 |
It might also be useful to select whether a sparse CSC or CSR matrix should be returned. |
Indeed, and it would really make sense and simplify my job a lot if I could assume that the sparsity pattern and the jacobian have the same structure and type, sparse or otherwise. Typically I wanna do jac = similar(sparsity, eltype(x)) and I don't want e.g. one to be tridiagonal and the other one sparse, even if they represent the same pattern |
pattern
pattern
I am not 100% sure this would make sense, thinking out loud here - in some scenarios, for example 10*10 hessian, instead of always returning the sparse form of the pattern having a more structured like diagonal, banded, triangular etc etc matrix would lend itself to nice uses downstream like one could check for such a structure and utilize it in algorithms. Looking at the code it seemed doable since the indices are collected before the sparse matrix is assembled
The text was updated successfully, but these errors were encountered: