Skip to content
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

Code generation for LDL and QR #2158

Closed
jaeandersson opened this issue Jan 24, 2018 · 2 comments
Closed

Code generation for LDL and QR #2158

jaeandersson opened this issue Jan 24, 2018 · 2 comments
Assignees
Milestone

Comments

@jaeandersson
Copy link
Member

Code generation for LDL and QR is currently not possible due to license restrictions (#2134). To enable code generation, the routines casadi_qr and casadi_ldl, currently residing in casadi_runtime.hpp, need to be reimplemented in a non-copyright infringing manner.

Note that this corresponds to an sparse QR or LDL factorization with all sparsity patterns already given.

@jaeandersson
Copy link
Member Author

jaeandersson commented Jan 25, 2018

LDL should be possible to calculate by conceptually performing the multiplication with row i and column j<=i:

  • j==i: d_i = a_ii - sum_{k<i} d_k * l_ik^2
  • j<i: l_ij = (a_ij - sum_{k<j} d_k * l_ik * l_kj) / d_j

jaeandersson added a commit that referenced this issue Jan 27, 2018
jaeandersson added a commit that referenced this issue Jan 27, 2018
jaeandersson added a commit that referenced this issue Jan 27, 2018
Returns upper triangular L^T only, no longer elimination tree
@jaeandersson
Copy link
Member Author

LDL reimplemented. The new implementation should be more efficient and needs less memory. It also doesn't require the elimination tree to be stored. Instead of calculating L, it calculates the upper triangular L^T, since upper triangular matrices are more natural to store and to operate on.

jaeandersson added a commit that referenced this issue Jan 29, 2018
jaeandersson added a commit that referenced this issue Jan 29, 2018
@jaeandersson jaeandersson self-assigned this Jan 29, 2018
@jaeandersson jaeandersson added this to the Version 3.4 milestone Jan 29, 2018
jaeandersson added a commit that referenced this issue Jan 29, 2018
jaeandersson added a commit that referenced this issue Jan 29, 2018
jaeandersson added a commit that referenced this issue Jan 29, 2018
jaeandersson added a commit that referenced this issue Feb 1, 2018
jaeandersson added a commit that referenced this issue Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant